<#assign module="driver"/>

<@override name="header">
    <link rel="stylesheet" href="${ctx}/assets/css/datetimepicker.css">
    <link rel="stylesheet" href="${ctx}/assets/css/jquery.Jcrop.css">
    <link rel="stylesheet" href="${ctx}/assets/css/jquery.foxibox.css">
    <style>
        /* autocomplete */
        div.ac {
            border: 1px solid #ccc;
            position: absolute;
            display: none;
            overflow: auto;
            background-color: #ffffff;
            z-index: 998;
        }

        div.ac > ul {
            margin-top: 10px;
            padding: 0;
        }

        div.ac > ul > li {
            height: 33px;
            line-height: 33px;
            cursor: pointer;
        }

        div.ac > ul > li:hover {
            background: #eee;
        }

        div.ac > ul > li > div span {
            padding-left: 15px;
        }

        div.ac > ul > li > div span em {
            color: red;
            font-style: normal;
        }
    </style>
</@override>
<@override name="body">
    <div class="row">

        <div class="col-md-12">
            <div class="tabbable"> <!-- Only required for left/right tabs -->
                <ul class="nav nav-tabs">
                    <li class="active"><a href="#basicInfo" data-toggle="tab">基本信息</a></li>
                    <li><a href="#detailedInfoTab" data-toggle="tab">详细信息</a></li>
                    <@daijia>
                        <li id="daijiaTabLi"
                            <#if driver.driverJobType?? && driver.driverJobType?contains('daijia')><#else>style="display:none;"</#if>>
                            <a href="#daijiaTab" data-toggle="tab">代驾</a></li>
                    </@daijia>
                    <@zhuan>
                        <li id="zhuancheTabLi"
                            <#if driver.driverJobType?? && driver.driverJobType?contains('zhuanche')><#else>style="display:none;"</#if>>
                            <a href="#zhuancheTab" data-toggle="tab">专车</a></li>
                    </@zhuan>
                    <@pao>
                        <li id="errandTabLi"
                            <#if driver.driverJobType?? && driver.driverJobType?contains('paotui')><#else>style="display:none;"</#if>>
                            <a href="#errandTab" data-toggle="tab">跑腿</a></li>
                    </@pao>
                    <@freight>
                        <li id="freightTabLi"
                            <#if driver.driverJobType?? && driver.driverJobType?contains('freight')><#else>style="display:none;"</#if>>
                            <a href="#freightTab" data-toggle="tab">货运</a></li>
                    </@freight>
                    <@zhuanxian>
                        <li id="zhuanxianTabLi"
                            <#if driver.driverJobType?? && driver.driverJobType?contains('zhuanxian')><#else>style="display:none;"</#if>>
                            <a href="#zhuanxianTab" data-toggle="tab">快车</a></li>
                    </@zhuanxian>
                    <@jgpt>
                        <li id="trainTabLi"
                            <#if driver.driverJobType?? && driver.driverJobType?contains('zhuanche')><#else>style="display:none;"</#if>>
                            <a href="#trainTab" data-toggle="tab">培训课程</a></li>
                        <li id="peccancyAndComplainTabLi"
                            <#if driver.driverJobType?? && driver.driverJobType?contains('zhuanche')><#else>style="display:none;"</#if>>
                            <a href="#peccancyAndComplainTab" data-toggle="tab">违章与投诉信息</a></li>
                    </@jgpt>
                </ul>

                <form id="submit_form" class="form-horizontal">
                    <input type="hidden" name="id" value="${driver.id}">
                    <input type="hidden" id="photo" name="photo" value="${driver.photo?if_exists}">
                    <input type="hidden" id="license" name="license" value="${driver.license?if_exists}">
                    <input type="hidden" id="travel" name="travel" value="${driver.travel?if_exists}">
                    <input type="hidden" id="bigPhoto" name="bigPhoto" value="${driver.bigPhoto?if_exists}">
                    <input type="hidden" id="idCardPhoto" name="idCardPhoto" value="${driver.idCardPhoto?if_exists}">
                    <input type="hidden" id="idCardHandPhoto" name="idCardHandPhoto"
                           value="${driver.idCardHandPhoto?if_exists}">
                    <input type="hidden" id="qualificationPhoto" name="qualificationPhoto"
                           value="${driver.qualificationPhoto?if_exists}">
                    <input type="hidden" id="backOfIdCardPhoto" name="backOfIdCardPhoto"
                           value="${driver.backOfIdCardPhoto?if_exists}">
                    <#if car??>
                        <input type="hidden" id="carId" name="carId" value="${car.id?if_exists}"/>
                    <#else>
                        <input type="hidden" id="carId" name="carId"/>
                    </#if>
                    <#if truck??>
                        <input type="hidden" id="truckId" name="truckId" value="${truck.id?if_exists}"/>
                    <#else>
                        <input type="hidden" id="truckId" name="truckId"/>
                    </#if>
                    <#if zhuanxianCar??>
                        <input type="hidden" id="zhuanxianCarId" name="zhuanxianCarId"
                               value="${zhuanxianCar.id?if_exists}"/>
                    <#else>
                        <input type="hidden" id="zhuanxianCarId" name="zhuanxianCarId"/>
                    </#if>
                    <div class="tab-content" id="app">
                        <div class="tab-pane in active" id="basicInfo">
                            <div class="panel margin-top">
                                <div class="panel-body">
                                    <div class="form-group">
                                        <div class="col-sm-9">
                                            <div style="float:left;width:200;margin-right:8px;">
                                                <p>服务人员头像 <@shiro.hasPermission name='driveredit'>
                                                        <button type="button" id="delete_photo"
                                                                class="btn btn-default btn-xs">删除
                                                        </button></@shiro.hasPermission></p>
                                                <a id="show_photo_div"
                                                   <#if driver.photo?? && (driver.photo?length>0)>href="${ctx}/upload/driver/${driver.photo}"
                                                   class="fancybox" data-fancybox-group="gallery"</#if>>
                                                    <img id="show_photo" width="200" height="200"
                                                         <#if driver.photo?? && (driver.photo?length>0)>src="${ctx}/upload/driver/${driver.photo}"</#if>/>
                                                </a>
                                                <p></p>
                                                <p>
                                                    <@shiro.hasPermission name='driveredit'>
                                                        <button type="button" href="javascript:;"
                                                                class="btn btn-primary" id="photo_upload_dialog">上传头像
                                                        </button>
                                                    </@shiro.hasPermission>
                                                </p>
                                            </div>
                                            <div style="float:left;width:317;margin-right:8px;">
                                                <p>服务人员身份证正面 <@shiro.hasPermission name='driveredit'>
                                                        <button type="button" id="delete_idCardPhoto"
                                                                class="btn btn-default btn-xs">删除
                                                        </button></@shiro.hasPermission></p>
                                                <a id="show_idCardPhoto_div"
                                                   <#if driver.idCardPhoto?? && (driver.idCardPhoto?length>0)>href="${ctx}/upload/idCardPhoto/${driver.idCardPhoto}"
                                                   class="fancybox" data-fancybox-group="gallery"</#if>>
                                                    <img id="show_idCardPhoto" width="317" height="200"
                                                         <#if driver.idCardPhoto?? && (driver.idCardPhoto?length>0)>src="${ctx}/upload/idCardPhoto/${driver.idCardPhoto}"</#if>/>
                                                </a>
                                                <p></p>
                                                <p>
                                                    <@shiro.hasPermission name='driveredit'>
                                                        <button type="button" href="javascript:;"
                                                                class="btn btn-primary" id="idCardPhoto_upload_dialog">
                                                            上传身份证照正面
                                                        </button>
                                                    </@shiro.hasPermission>
                                                </p>
                                            </div>
                                            <div style="float:left;width:317;margin-right:8px;">
                                                <p>服务人员身份证反面
                                                    <@shiro.hasPermission name='driveredit'>
                                                        <button type="button" id="delete_backOfIdCardPhoto"
                                                                class="btn btn-default btn-xs">删除
                                                        </button>
                                                    </@shiro.hasPermission></p>
                                                <a id="show_backOfIdCardPhoto_div"
                                                   <#if driver.backOfIdCardPhoto?? && (driver.backOfIdCardPhoto?length>0)>href="${ctx}/upload/backOfIdCardPhoto/${driver.backOfIdCardPhoto}"
                                                   class="fancybox" data-fancybox-group="gallery"</#if>>
                                                    <img id="show_backOfIdCardPhoto" width="317" height="200"
                                                         <#if driver.backOfIdCardPhoto?? && (driver.backOfIdCardPhoto?length>0)>src="${ctx}/upload/backOfIdCardPhoto/${driver.backOfIdCardPhoto}"</#if>/>
                                                </a>
                                                <p></p>
                                                <p>
                                                    <@shiro.hasPermission name='driveredit'>
                                                        <button type="button" href="javascript:;"
                                                                class="btn btn-primary"
                                                                id="backOfIdCardPhoto_upload_dialog">
                                                            上传身份证照反面
                                                        </button>
                                                    </@shiro.hasPermission>
                                                </p>
                                            </div>
                                            <div style="float:left;width:317;margin-right:8px;">
                                                <p>服务人员手持身份证 <@shiro.hasPermission name='driveredit'>
                                                        <button type="button" id="delete_idCardHandPhoto"
                                                                class="btn btn-default btn-xs">删除
                                                        </button></@shiro.hasPermission></p>
                                                <a id="show_idCardHandPhoto_div"
                                                   <#if driver.idCardHandPhoto?? && (driver.idCardHandPhoto?length>0)>href="${ctx}/upload/idCardHandPhoto/${driver.idCardHandPhoto}"
                                                   class="fancybox" data-fancybox-group="gallery"</#if>>
                                                    <img id="show_idCardHandPhoto" width="317" height="200"
                                                         <#if driver.idCardHandPhoto?? && (driver.idCardHandPhoto?length>0)>src="${ctx}/upload/idCardHandPhoto/${driver.idCardHandPhoto}"</#if>/>
                                                </a>
                                                <p></p>
                                                <p>
                                                    <@shiro.hasPermission name='driveredit'>
                                                        <button type="button" href="javascript:;"
                                                                class="btn btn-primary"
                                                                id="idCardHandPhoto_upload_dialog">上传手持身份证照
                                                        </button>
                                                    </@shiro.hasPermission>
                                                </p>
                                            </div>
                                            <div style="float:left;width:200;">
                                                <p>推荐二维码 </p>
                                                <img width="200" height="200" src="${shareQrCode?if_exists}"/>
                                            </div>
                                        </div>
                                    </div>

                                    <div class="form-group">
                                        <label for="username" class="col-sm-1 control-label">工号：</label>
                                        <div class="col-sm-4">
                                            ${driver.username?if_exists}
                                        </div>
                                    </div>

                                    <div class="form-group">
                                        <label for="name" class="col-sm-1 control-label"><em>*</em>昵称：</label>
                                        <div class="col-sm-4">
                                            <input class="form-control" id="name" name="name" type="text"
                                                   value="${driver.name?if_exists}" required
                                                   placeholder="填写服务人员昵称，用于APP显示"/>
                                        </div>
                                    </div>

                                    <div class="form-group">
                                        <label for="name" class="col-sm-1 control-label"><em>*</em>真实姓名：</label>
                                        <div class="col-sm-4">
                                            <input class="form-control" id="realname" name="realname" type="text"
                                                   value="${driver.realname?if_exists}" required
                                                   placeholder="填写服务人员真实姓名"/>
                                        </div>
                                    </div>

                                    <div class="form-group">
                                        <label for="idCard" class="col-sm-1 control-label"><em>*</em>身份证号：</label>
                                        <div class="col-sm-4">
                                            <input class="form-control" id="idCard" name="idCard" type="text"
                                                   value="${driver.idCard?if_exists}" required
                                                   placeholder="填写服务人员身份证号"/>
                                        </div>
                                    </div>
                                    <div class="form-group">
                                        <label for="bankCard" class="col-sm-1 control-label"><em>*</em>绑定支付账号：</label>
                                        <div class="col-sm-4">
                                            <input class="form-control" id="bankCard" name="bankCard" type="text"
                                                   value="${driver.bankCard?if_exists}" required
                                                   placeholder="填写绑定服务人员支付账号"/>
                                        </div>
                                    </div>
                                    <div class="form-group">
                                        <label for="gender" class="col-sm-1 control-label"><em>*</em>性别：</label>
                                        <div class="col-sm-4">
                                            <div class="checkbox">
                                                <label>
                                                    <input type="radio" name="gender" value="男"
                                                           <#if driver.gender?? && driver.gender=='男'>checked="checked"</#if> />男
                                                </label>
                                                <label>
                                                    <input type="radio" name="gender" value="女"
                                                           <#if driver.gender?? && driver.gender=='女'>checked="checked"</#if> />女
                                                </label>
                                            </div>
                                        </div>
                                    </div>

                                    <div class="form-group">
                                        <label for="phone" class="col-sm-1 control-label"><em>*</em>手机号：</label>
                                        <div class="col-sm-4">
                                            <input class="form-control" id="phone" name="phone" type="text"
                                                   value="${driver.phone?if_exists}" required placeholder="填写服务人员手机号"/>
                                        </div>
                                    </div>

                                    <div class="form-group">
                                        <label for="phone" class="col-sm-1 control-label"><em>*</em>紧急联系人：</label>
                                        <div class="col-sm-4">
                                            <input class="form-control" id="emergency" name="emergency" type="text"
                                                   value="${driver.emergency?if_exists}" required
                                                   placeholder="姓名+电话+关系"/>
                                        </div>
                                    </div>

                                    <div class="form-group">
                                        <label for="jobTime" class="col-sm-1 control-label"><em>*</em>入职时间：</label>
                                        <div class="col-sm-4">
                                            <input class="form-control" id="jobTime" name="jobTime" type="text"
                                                   <#if driver.jobTime??>value="${driver.jobTime?string('yyyy-MM-dd')}"</#if>
                                                   required readonly/>
                                        </div>
                                    </div>

                                    <div class="form-group">
                                        <label for="licenseTime" class="col-sm-1 control-label"><em>*</em>领证时间：</label>
                                        <div class="col-sm-4">
                                            <input class="form-control" id="licenseTime" name="licenseTime" type="text"
                                                   <#if driver.licenseTime??>value="${driver.licenseTime?string('yyyy-MM-dd')}"</#if>
                                                   required readonly/>
                                        </div>
                                    </div>

                                    <div class="form-group">
                                        <label for="type" class="col-sm-1 control-label"><em>*</em>员工类型：</label>
                                        <div class="col-sm-4">
                                            <select class="form-control" id="type" name="type" required>
                                                <option value="兼职"
                                                        <#if driver.type?? && driver.type=='兼职'>selected="selected"</#if>>
                                                    兼职
                                                </option>
                                                <option value="全职"
                                                        <#if driver.type?? && driver.type=='全职'>selected="selected"</#if>>
                                                    全职
                                                </option>
                                            </select>
                                            <span class="help-block"><em>全职不提成</em></span>
                                        </div>
                                    </div>

                                    <div class="form-group">
                                        <label for="type" class="col-sm-1 control-label"><em>*</em>服务类型：</label>
                                        <div class="col-sm-11">
                                            <div class="checkbox">
                                                <@daijia>
                                                    <label>
                                                        <input type="checkbox" name="driverJobType" value="daijia"
                                                               <#if driver.driverJobType?? && driver.driverJobType?contains('daijia')>checked="checked"</#if>/>代驾
                                                    </label>
                                                </@daijia>
                                                <@zhuan>
                                                    <label>
                                                        <input type="checkbox" name="driverJobType" value="zhuanche"
                                                               <#if driver.driverJobType?? && driver.driverJobType?contains('zhuanche')>checked="checked"</#if>/>专车
                                                    </label>
                                                </@zhuan>
                                                <@pao>
                                                    <label>
                                                        <input type="checkbox" name="driverJobType" value="paotui"
                                                               <#if driver.driverJobType?? && driver.driverJobType?contains('paotui')>checked="checked"</#if>/>跑腿
                                                    </label>
                                                </@pao>
                                                <@freight>
                                                    <label>
                                                        <input type="checkbox" name="driverJobType" value="freight"
                                                               <#if driver.driverJobType?? && driver.driverJobType?contains('freight')>checked="checked"</#if>/>货运
                                                    </label>
                                                </@freight>
                                                <@zhuanxian>
                                                    <label>
                                                        <input type="checkbox" name="driverJobType" value="zhuanxian"
                                                               <#if driver.driverJobType?? && driver.driverJobType?contains('zhuanxian')>checked="checked"</#if>/>快车
                                                    </label>
                                                </@zhuanxian>
                                                <input type="hidden" name="detailedJobType" id="detailedJobType"/>
                                            </div>
                                        </div>
                                    </div>

                                    <div class="form-group">
                                        <label for="driverRabate"
                                               class="col-sm-1 control-label"><em>*</em>推荐百分比：</label>
                                        <div class="col-sm-4 input-group"
                                             style="padding-left: 15px;padding-right: 15px;">
                                            <input class="form-control" id="driverRabate" name="driverRabate"
                                                   type="number" max="100" min="0.1" step="0.1"
                                                   value="${driverRabate?if_exists}" required placeholder="百分比"/><span
                                                    class="input-group-addon">%</span>
                                        </div>
                                    </div>

                                    <div class="form-group">
                                        <input type="hidden" name="tixian" id="tixian">
                                        <label for="tixianSwitch" class="col-sm-1 control-label"><em>*</em>是否允许提现：</label>
                                        <i-switch v-model="tixian" id="tixianSwitch">
                                            <span slot="open">开</span>
                                            <span slot="close">关</span>
                                        </i-switch>
                                    </div>

                                    <div class="form-group">
                                        <input type="hidden" name="tuiguang" id="tuiguang">
                                        <label for="tuiguangSwitch" class="col-sm-1 control-label"><em>*</em>是否允许推广：</label>
                                        <i-switch v-model="tuiguang" id="tuiguangSwitch">
                                            <span slot="open">开</span>
                                            <span slot="close">关</span>
                                        </i-switch>
                                    </div>

                                    <div class="form-group" id="paotuichild"
                                         <#if driver.driverJobType?? && driver.driverJobType?contains('paotui')><#else>style="display:none;"</#if>>
                                        <label for="type" class="col-sm-1 control-label"><em>*</em>跑腿子类型：</label>
                                        <div class="col-sm-11">
                                            <div class="checkbox">
                                                <#if (detailedJobType?? && detailedJobType?size>0)>
                                                    <#list detailedJobType as JobType>
                                                        <label>
                                                            <input type="checkbox" name="JobType" value="${JobType.id}"
                                                                   <#if driverJobTypes?? && driverJobTypes?contains(JobType.id?string)>checked="checked"</#if>/>${JobType.typeName}
                                                        </label>
                                                    </#list>
                                                </#if>
                                            </div>
                                        </div>
                                    </div>
                                </div>
                            </div>
                        </div>
                        <div class="tab-pane in" id="detailedInfoTab">
                            <div class="panel margin-top">
                                <div class="panel-body">
                                    <div class="form-group">
                                        <div class="col-sm-12">
                                            <div style="float:left;width:550;margin-right:8px;">
                                                <p>服务人员驾驶证 <@shiro.hasPermission name='driveredit'>
                                                        <button type="button" id="delete_license"
                                                                class="btn btn-default btn-xs">删除
                                                        </button></@shiro.hasPermission></p>
                                                <a id="show_license_div"
                                                   <#if driver.license?? && (driver.license?length>0)>href="${ctx}/upload/license/${driver.license}"
                                                   class="fancybox" data-fancybox-group="gallery"</#if>>
                                                    <img id="show_license" width="550" height="200"
                                                         <#if driver.license?? && (driver.license?length>0)>src="${ctx}/upload/license/${driver.license}"</#if>/>
                                                </a>
                                                <p></p>
                                                <p>
                                                    <@shiro.hasPermission name='driveredit'>
                                                        <button type="button" href="javascript:;"
                                                                class="btn btn-primary" id="license_upload_dialog">上传驾驶证
                                                        </button>
                                                    </@shiro.hasPermission>
                                                </p>
                                            </div>
                                            <div style="float:left;width:550;margin-right:8px;">
                                                <p>服务人员行驶证
                                                    <button type="button" id="delete_travel"
                                                            class="btn btn-default btn-xs">删除
                                                    </button>
                                                </p>
                                                <a id="show_travel_div"
                                                   <#if driver.travel?? && (driver.travel?length>0)>href="${ctx}/upload/travel/${driver.travel}"
                                                   class="fancybox" data-fancybox-group="gallery"</#if>>
                                                    <img id="show_travel" width="550" height="200"
                                                         <#if driver.travel?? && (driver.travel?length>0)>src="${ctx}/upload/travel/${driver.travel}"</#if>/>
                                                </a>
                                                <p></p>
                                                <p>
                                                    <button type="button" href="javascript:;" class="btn btn-primary"
                                                            id="travel_upload_dialog">上传行驶证
                                                    </button>
                                                </p>
                                            </div>
                                            <div style="float:left;width:550;margin-right:8px;">
                                                <p>网约车资格证
                                                    <button type="button" id="delete_travel"
                                                            class="btn btn-default btn-xs">删除
                                                    </button>
                                                </p>
                                                <a id="show_qualificationPhoto_div"
                                                   <#if driver.qualificationPhoto?? && (driver.qualificationPhoto?length>0)>href="${ctx}/upload/qualificationPhoto/${driver.qualificationPhoto}"
                                                   class="fancybox" data-fancybox-group="gallery"</#if>>
                                                    <img id="show_qualificationPhoto" width="550" height="200"
                                                         <#if driver.qualificationPhoto?? && (driver.qualificationPhoto?length>0)>src="${ctx}/upload/qualificationPhoto/${driver.qualificationPhoto}"</#if>/>
                                                </a>
                                                <p></p>
                                                <p>
                                                    <button type="button" href="javascript:;" class="btn btn-primary"
                                                            id="qualification_upload_dialog">上传资格证
                                                    </button>
                                                </p>
                                            </div>
                                            <div style="float:left;width:200;margin-right:8px;">
                                                <p>服务人员全身照 <@shiro.hasPermission name='driveredit'>
                                                        <button type="button" id="delete_bigPhoto"
                                                                class="btn btn-default btn-xs">删除
                                                        </button></@shiro.hasPermission></p>
                                                <a id="show_bigPhoto_div"
                                                   <#if driver.bigPhoto?? && (driver.bigPhoto?length>0)>href="${ctx}/upload/driverbigphoto/${driver.bigPhoto}"
                                                   class="fancybox" data-fancybox-group="gallery"</#if>>
                                                    <img id="show_bigPhoto" width="125" height="200"
                                                         <#if driver.bigPhoto?? && (driver.bigPhoto?length>0)>src="${ctx}/upload/driverbigphoto/${driver.bigPhoto}"</#if>/>
                                                </a>
                                                <p></p>
                                                <p>
                                                    <@shiro.hasPermission name='driveredit'>
                                                        <button type="button" href="javascript:;"
                                                                class="btn btn-primary" id="bigPhoto_upload_dialog">
                                                            上传全身照
                                                        </button>
                                                    </@shiro.hasPermission>
                                                </p>
                                            </div>
                                        </div>
                                    </div>
                                    <@zhuanxian>
                                        <@shiro.hasPermission name='drivergrade'>
                                            <div class="form-group">
                                                <label for="gradeId" class="col-sm-2 control-label">服务人员等级：</label>
                                                <div class="col-sm-4">
                                                    <select class="form-control" id="gradeId" name="gradeId">
                                                        <option value="">--请选择等级--
                                                            <optin>
                                                                <#if (driverGrades?? && driverGrades?size>0)>
                                                                <#list driverGrades as dg>
                                                        <option value="${dg.id}"
                                                                <#if driver.gradeId?? && driver.gradeId==dg.id>selected="selected"</#if>>${dg.name}</option>
                                                        </#list>
                                                        </#if>
                                                    </select>
                                                </div>
                                            </div>
                                        </@shiro.hasPermission>
                                    </@zhuanxian>
                                    <div class="form-group">
                                        <label for="pressingPhone" class="col-sm-2 control-label">服务次数：</label>
                                        <div class="col-sm-4">
                                            <input class="form-control" id="driveTimes" name="driveTimes" type="number"
                                                   min="0" value="${driver.driveTimes?if_exists}"/>
                                        </div>
                                    </div>

                                    <div class="form-group">
                                        <label for="pressingPhone" class="col-sm-2 control-label">服务人员评分：</label>
                                        <div class="col-sm-4">
                                            <input class="form-control" id="starLevel" name="starLevel" type="text"
                                                   min="1" max="5" value="${driver.starLevel?if_exists}"
                                                   placeholder="服务人员评分为1-5分"/>
                                        </div>
                                    </div>

                                    <div class="form-group">
                                        <label for="pressingPhone" class="col-sm-2 control-label">驾照类型：</label>
                                        <div class="col-sm-4">
                                            <select class="form-control licenseType_class"
                                                    id="licenseType_select"></select>
                                            <input type="hidden" id="licenseType" name="licenseType"
                                                   value="${driver.licenseType?if_exists}">
                                            <input type="hidden" id="licenseTypeName" name="licenseTypeName"
                                                   value="${driver.licenseTypeName?if_exists}">
                                        </div>
                                    </div>

                                    <div class="form-group">
                                        <label for="pressingPhone" class="col-sm-2 control-label">介绍人：</label>
                                        <div class="col-sm-4">
                                            <input class="form-control" id="introducer" name="introducer" type="text"
                                                   value="${driver.introducer?if_exists}"/>
                                        </div>
                                    </div>

                                    <div class="form-group">
                                        <label for="pressingPhone" class="col-sm-2 control-label">身高(cm)：</label>
                                        <div class="col-sm-4">
                                            <input class="form-control" id="height" name="height" type="number"
                                                   value="${driver.height?if_exists}" min="0"/>
                                        </div>
                                    </div>
                                    <div class="form-group">
                                        <label for="driverCensus" class="col-sm-2 control-label">户口登记机关：</label>
                                        <div class="col-sm-4">
                                            <input class="form-control" id="driverCensus" name="driverCensus"
                                                   type="text" value="${driver.driverCensus?if_exists}" required
                                                   placeholder="填写户口登记机关名称"/>
                                        </div>
                                    </div>
                                    <div class="form-group">
                                        <label for="pressingPhone" class="col-sm-2 control-label">籍贯：</label>
                                        <div class="col-sm-4">
                                            <input class="form-control" id="origin" name="origin" type="text"
                                                   value="${driver.origin?if_exists}"/>
                                        </div>
                                    </div>

                                    <div class="form-group">
                                        <label for="address" class="col-sm-2 control-label">家庭住址：</label>
                                        <div class="col-sm-4">
                                            <input class="form-control" id="address" name="address" type="text"
                                                   value="${driver.address?if_exists}"/>
                                        </div>
                                    </div>

                                    <div class="form-group">
                                        <label for="pressingName" class="col-sm-2 control-label">紧急联系人：</label>
                                        <div class="col-sm-4">
                                            <input class="form-control" id="pressingName" name="pressingName"
                                                   type="text" value="${driver.pressingName?if_exists}"/>
                                        </div>
                                    </div>

                                    <div class="form-group">
                                        <label for="pressingPhone" class="col-sm-2 control-label">紧急电话：</label>
                                        <div class="col-sm-4">
                                            <input class="form-control" id="pressingPhone" name="pressingPhone"
                                                   type="text" value="${driver.pressingPhone?if_exists}"/>
                                        </div>
                                    </div>

                                    <div class="form-group">
                                        <label for="memo" class="col-sm-2 control-label">备注：</label>
                                        <div class="col-sm-4">
                                            <textarea class="form-control" cols="20" id="memo" name="memo"
                                                      rows="2">${driver.memo?if_exists}</textarea>
                                        </div>
                                    </div>

                                </div>
                            </div>
                        </div>

                        <!--违章与投诉信息-->
                        <div class="tab-pane in" id="peccancyAndComplainTab">
                            <div class="col-xs-12" style=" padding: 0px 20px 15px 5px;">
                                <button class="pull-right btn btn-primary addPeccancyAndComplain" type="button"><i
                                            class="icon-plus"></i>&nbsp;添加违章与投诉信息
                                </button>
                            </div>
                            <div class="panel margin-top">
                                <div class="panel-body">
                                    <div class="tabta-content">
                                        <table class="table table-condensed table-striped"
                                               id="peccancyAndComplainTable">
                                            <tbody>
                                            <tr>
                                                <th>车牌号码</th>
                                                <th>类型</th>
                                                <th>订单号</th>
                                                <th>违章/投诉时间</th>
                                                <th>原因</th>
                                                <th>处理时间</th>
                                                <th>处理结果</th>
                                            </tr>
                                            </tbody>
                                        </table>
                                        <br>
                                        <div style="text-align:center" id="NoData"></div>
                                        </br>
                                        <ul class="pagination pull-left pagination-sm pageshow" style="display:none;">
                                            <li><a></a></li>
                                        </ul>
                                        <ul class="pagination pull-left pagination-sm pagedata" style="display:none;">
                                        </ul>
                                    </div>

                                </div>
                            </div>
                        </div>
                        <@daijia>
                            <div class="tab-pane in" id="daijiaTab">
                                <div class="panel margin-top">
                                    <div class="panel-body">
                                        <div class="col-sm-5" id="daijia_div">
                                            <h4>代驾提成</h4>
                                            <hr/>
                                            <#list companys?sort_by("sort")?reverse as company>
                                                <div class="form-group">
                                                    <input type="hidden"
                                                           name="driverChoseLevels[${company_index}].companyId"
                                                           value="${company.id}">
                                                    <label for="type"><em>*</em>接${company.abbreviation?if_exists}
                                                        的订单提成方式<#if companyId==company.id>
                                                        <em>(当前登录用户所在公司)</em></#if><#if driver.companyId==company.id>
                                                        <em>(服务人员所在公司)</em></#if>：</label>
                                                    <select class="form-control"
                                                            name="driverChoseLevels[${company_index}].driverlevelId">
                                                        <option value="">不提成</option>
                                                        <#list company.driverLevels as driverlevel>
                                                            <option value="${driverlevel.id}"
                                                                    <#if driverlevel.driverChecked>selected="selected"</#if>>${driverlevel.name}</option>
                                                        </#list>
                                                        <#if driver.companyId!=company.id>
                                                            <option value="0"
                                                                    <#if company.useMine>selected="selected"</#if>>
                                                                始终使用服务人员所在公司提成
                                                            </option>
                                                        </#if>
                                                    </select>
                                                </div>
                                            </#list>
                                        </div>
                                    </div>
                                </div>
                            </div>
                        </@daijia>
                        <@zhuan>
                            <div class="tab-pane in" id="zhuancheTab">
                                <div class="panel margin-top">
                                    <div class="panel-body">
                                        <div class="col-sm-7">
                                            <h4>专车服务人员信息</h4>
                                            <hr/>
                                            <div class="form-group">
                                                <label for="carNumber"
                                                       class="col-sm-3 control-label">平台的注册地行政区划代码：</label>
                                                <div class="col-sm-3">
                                                    <select class="form-control addressCode_class"
                                                            id="addressCode_select">
                                                    </select>
                                                    <input type="hidden" id="addressCode" name="addressCode"
                                                           value="${driver.addressCode?if_exists}">
                                                    <input type="hidden" id="addressCodeArr" name="addressCodeArr"
                                                           value="${driver.addressCodeArr?if_exists}">
                                                </div>
                                            </div>
                                            <div class="form-group">
                                                <label for="carNumber" class="col-sm-3 control-label">车辆车牌：</label>
                                                <div class="col-sm-5">
                                                    <input class="form-control" id="carNumber" name="carNumber"
                                                           <#if car??>value="${car.carName?if_exists} ${car.carNumber?if_exists} ${car.flights?if_exists}"</#if>
                                                           type="text" placeholder="请输入车牌号"/>
                                                </div>
                                            </div>
                                            <div class="form-group">
                                                <label for="driverLicenseNo"
                                                       class="col-sm-3 control-label">机动车驾驶证号：</label>
                                                <div class="col-sm-5">
                                                    <input class="form-control" id="driverLicenseNo"
                                                           name="driverLicenseNo" type="text"
                                                           value="${driver.driverLicenseNo?if_exists}"
                                                           placeholder="请输入机动车驾驶证号"/>
                                                </div>
                                            </div>
                                            <div class="form-group">
                                                <label for="driverLicenseId"
                                                       class="col-sm-3 control-label">机动车驾档编号：</label>
                                                <div class="col-sm-5">
                                                    <input class="form-control" id="driverLicenseId"
                                                           name="driverLicenseId" type="text"
                                                           value="${driver.driverLicenseId?if_exists}"
                                                           placeholder="请输入机动车驾档编号"/>
                                                </div>
                                            </div>
                                            <div class="form-group">
                                                <label for="nationality" class="col-sm-3 control-label">国籍：</label>
                                                <div class="col-sm-5">
                                                    <input class="form-control" id="nationality" name="nationality"
                                                           value="${driver.nationality?if_exists}" type="text"
                                                           placeholder="请输入国籍"/>
                                                </div>
                                            </div>
                                            <div class="form-group">
                                                <label for="nation" class="col-sm-3 control-label">驾驶员民族：</label>
                                                <div class="col-sm-5">
                                                    <select class="form-control nation_class"
                                                            id="nation_select"></select>
                                                    <input type="hidden" id="nation" name="nation"
                                                           value="${driver.nation?if_exists}">
                                                    <input type="hidden" id="nationName" name="nationName"
                                                           value="${driver.nationName?if_exists}">
                                                </div>
                                            </div>
                                            <div class="form-group">
                                                <label for="birthday" class="col-sm-3 control-label">出生日期：</label>
                                                <div class="col-sm-5">
                                                    <input class="form-control" id="birthday" name="birthday"
                                                           type="text" placeholder="请输入出生日期"
                                                           <#if driver.birthday??>value="${driver.birthday?string('yyyy-MM-dd')}"</#if>
                                                           readonly/>
                                                </div>
                                            </div>
                                            <div class="form-group">
                                                <label for="marital" class="col-sm-3 control-label">驾驶员婚姻状况：</label>
                                                <div class="col-sm-5">
                                                    <select id="marital" name="marital" class="form-control">
                                                        <option value="0"
                                                                <#if driver.marital?? && driver.marital==0>selected="selected"</#if>>
                                                            未婚
                                                        </option>
                                                        <option value="1"
                                                                <#if driver.marital?? && driver.marital==1>selected="selected"</#if>>
                                                            已婚
                                                        </option>
                                                        <option value="2"
                                                                <#if driver.marital?? && driver.marital==2>selected="selected"</#if>>
                                                            离异
                                                        </option>
                                                        <option value="3"
                                                                <#if driver.marital?? && driver.marital==3>selected="selected"</#if>>
                                                            丧偶
                                                        </option>
                                                    </select>
                                                </div>
                                            </div>
                                            <div class="form-group">
                                                <label for="education" class="col-sm-3 control-label">驾驶员学历：</label>
                                                <div class="col-sm-5">
                                                    <select class="form-control education_class"
                                                            id="education_select"></select>
                                                    <input type="hidden" id="education" name="education"
                                                           value="${driver.education?if_exists}">
                                                    <input type="hidden" id="educationName" name="educationName"
                                                           value="${driver.educationName?if_exists}">
                                                </div>
                                            </div>
                                            <div class="form-group">
                                                <label for="foreignLanguageAbility" class="col-sm-3 control-label">驾驶员外语能力：</label>
                                                <div class="col-sm-5">
                                                    <input class="form-control" id="foreignLanguageAbility"
                                                           name="foreignLanguageAbility" type="text"
                                                           value="${driver.foreignLanguageAbility?if_exists}"
                                                           placeholder="请输入驾驶员外语能力"/>
                                                </div>
                                            </div>
                                            <div class="form-group">
                                                <label for="concatAddress"
                                                       class="col-sm-3 control-label">驾驶员驾驶员通信地址：</label>
                                                <div class="col-sm-5">
                                                    <input class="form-control" id="concatAddress" name="concatAddress"
                                                           type="text" value="${driver.concatAddress?if_exists}"
                                                           placeholder="请输入驾驶员驾驶员通信地址"/>
                                                </div>
                                            </div>
                                            <div class="form-group">
                                                <label for="trafficViolation"
                                                       class="col-sm-3 control-label">交通违章次数：</label>
                                                <div class="col-sm-5">
                                                    <input class="form-control" id="trafficViolation"
                                                           name="trafficViolation" type="number"
                                                           value="${driver.trafficViolation?if_exists}"
                                                           placeholder="请输入交通违章次数"/>
                                                </div>
                                            </div>
                                            <div class="form-group">
                                                <label for="driverLicenseValid" class="col-sm-3 control-label">驾驶证有效期起始时间：</label>
                                                <div class="col-sm-5">
                                                    <input class="form-control" id="driverLicenseValid"
                                                           name="driverLicenseValid" type="text"
                                                           placeholder="请输入驾驶证有效期起始时间"
                                                           <#if driver.driverLicenseValid??>value="${driver.driverLicenseValid?string('yyyy-MM-dd')}"</#if>
                                                           readonly/>
                                                </div>
                                            </div>
                                            <div class="form-group">
                                                <label for="driverLicenseInvalid" class="col-sm-3 control-label">驾驶证有效期限结束时间：</label>
                                                <div class="col-sm-5">
                                                    <input class="form-control" id="driverLicenseInvalid"
                                                           name="driverLicenseInvalid" type="text"
                                                           placeholder="请输入驾驶证有效期限结束时间"
                                                           <#if driver.driverLicenseInvalid??>value="${driver.driverLicenseInvalid?string('yyyy-MM-dd')}"</#if>
                                                           readonly/>
                                                </div>
                                            </div>
                                            <div class="form-group">
                                                <label for="taxiLicenseNo"
                                                       class="col-sm-3 control-label">网络预约出租车驾驶员证编号：</label>
                                                <div class="col-sm-5">
                                                    <input class="form-control" id="taxiLicenseNo" name="taxiLicenseNo"
                                                           type="text" value="${driver.taxiLicenseNo?if_exists}"
                                                           placeholder="请输入网络预约出租车驾驶员证编号"/>
                                                </div>
                                            </div>
                                            <div class="form-group">
                                                <label for="taxiLicenseOrg"
                                                       class="col-sm-3 control-label">资格证发证机构：</label>
                                                <div class="col-sm-5">
                                                    <input class="form-control" id="taxiLicenseOrg"
                                                           name="taxiLicenseOrg" type="text"
                                                           value="${driver.taxiLicenseOrg?if_exists}"
                                                           placeholder="请输入网络预约出租汽车驾驶员证发证机构"/>
                                                </div>
                                            </div>
                                            <div class="form-group">
                                                <label for="taxiLicenseRegister"
                                                       class="col-sm-3 control-label">资格证发证日期：</label>
                                                <div class="col-sm-5">
                                                    <input class="form-control" id="taxiLicenseRegister"
                                                           name="taxiLicenseRegister" type="text"
                                                           placeholder="请输入资格证发证日期"
                                                           <#if driver.taxiLicenseRegister??>value="${driver.taxiLicenseRegister?string('yyyy-MM-dd')}"</#if>
                                                           readonly/>
                                                </div>
                                            </div>
                                            <div class="form-group">
                                                <label for="taxiLicenseRecive"
                                                       class="col-sm-3 control-label">初次领取资格证日期：</label>
                                                <div class="col-sm-5">
                                                    <input class="form-control" id="taxiLicenseRecive"
                                                           name="taxiLicenseRecive" type="text"
                                                           placeholder="请输入初次领取资格证日期"
                                                           <#if driver.taxiLicenseRecive??>value="${driver.taxiLicenseRecive?string('yyyy-MM-dd')}"</#if>
                                                           readonly/>
                                                </div>
                                            </div>
                                            <div class="form-group">
                                                <label for="taxiLicenseInvalid" class="col-sm-3 control-label">资格证有效起始日期：</label>
                                                <div class="col-sm-5">
                                                    <input class="form-control" id="taxiLicenseValid"
                                                           name="taxiLicenseValid" type="text"
                                                           placeholder="请输入资格证有效起始日期"
                                                           <#if driver.taxiLicenseValid??>value="${driver.taxiLicenseValid?string('yyyy-MM-dd')}"</#if>
                                                           readonly/>
                                                </div>
                                            </div>
                                            <div class="form-group">
                                                <label for="taxiLicenseInvalid" class="col-sm-3 control-label">资格证有效截止日期：</label>
                                                <div class="col-sm-5">
                                                    <input class="form-control" id="taxiLicenseInvalid"
                                                           name="taxiLicenseInvalid" type="text"
                                                           placeholder="请输入资格证有效截止日期"
                                                           <#if driver.taxiLicenseInvalid??>value="${driver.taxiLicenseInvalid?string('yyyy-MM-dd')}"</#if>
                                                           readonly/>
                                                </div>
                                            </div>
                                            <div class="form-group">
                                                <label for="taxiLicenseOrg"
                                                       class="col-sm-3 control-label">合同（或协议）签署公司：</label>
                                                <div class="col-sm-5">
                                                    <input class="form-control" id="contractCompany"
                                                           name="contractCompany" type="text"
                                                           value="${driver.contractCompany?if_exists}"
                                                           placeholder="请输入合同（或协议）签署公司"/>
                                                </div>
                                            </div>
                                            <div class="form-group">
                                                <label for="contractValid"
                                                       class="col-sm-3 control-label">合同有效期起始时间：</label>
                                                <div class="col-sm-5">
                                                    <input class="form-control" id="contractValid" name="contractValid"
                                                           type="text" placeholder="请输入合同有效期起起始时间"
                                                           <#if driver.contractValid??>value="${driver.contractValid?string('yyyy-MM-dd')}"</#if>
                                                           readonly/>
                                                </div>
                                            </div>
                                            <div class="form-group">
                                                <label for="contractInvalid"
                                                       class="col-sm-3 control-label">合同有效期结束时间：</label>
                                                <div class="col-sm-5">
                                                    <input class="form-control" id="contractInvalid"
                                                           name="contractInvalid" type="text" placeholder="请输入合同有效期结束时间"
                                                           <#if driver.contractInvalid??>value="${driver.contractInvalid?string('yyyy-MM-dd')}"</#if>
                                                           readonly/>
                                                </div>
                                            </div>
                                            <div class="form-group">
                                                <label for="cruise" class="col-sm-3 control-label">是否巡游出租汽车驾驶员：</label>
                                                <div class="col-sm-5">
                                                    <select id="cruise" name="cruise" class="form-control">
                                                        <option value="0"
                                                                <#if driver.cruise?? && driver.cruise==0>selected="selected"</#if>>
                                                            否
                                                        </option>
                                                        <option value="1"
                                                                <#if driver.cruise?? && driver.cruise==1>selected="selected"</#if>>
                                                            是
                                                        </option>
                                                    </select>
                                                </div>
                                            </div>
                                            <div class="form-group">
                                                <label for="inBlacklist" class="col-sm-3 control-label">是否在黑名单内：</label>
                                                <div class="col-sm-5">
                                                    <select id="inBlacklist" name="inBlacklist" class="form-control">
                                                        <option value="0"
                                                                <#if driver.inBlacklist?? && driver.inBlacklist?string("true","false")=="false">selected="selected"</#if>>
                                                            否
                                                        </option>
                                                        <option value="1"
                                                                <#if driver.inBlacklist?? && driver.inBlacklist?string("true","false")=="true">selected="selected"</#if>>
                                                            是
                                                        </option>
                                                    </select>
                                                </div>
                                            </div>
                                            <div class="form-group">
                                                <label for="phoneOperator"
                                                       class="col-sm-3 control-label">服务人员运营商：</label>
                                                <div class="col-sm-5">
                                                    <select id="phoneOperator" name="phoneOperator"
                                                            class="form-control">
                                                        <option value="CHINA_UNICOM"
                                                                <#if driver.phoneOperator?? && driver.phoneOperator=="CHINA_UNICOM">selected="selected"</#if>>
                                                            中国联通
                                                        </option>
                                                        <option value="CHINA_MOBILE"
                                                                <#if driver.phoneOperator?? && driver.phoneOperator=="CHINA_MOBILE">selected="selected"</#if>>
                                                            中国移动
                                                        </option>
                                                        <option value="CHINA_TELCOM"
                                                                <#if driver.phoneOperator?? && driver.phoneOperator=="CHINA_TELCOM">selected="selected"</#if>>
                                                            中国电信
                                                        </option>
                                                        <option value="QT"
                                                                <#if driver.phoneOperator?? && driver.phoneOperator=="QT">selected="selected"</#if>>
                                                            其他
                                                        </option>
                                                    </select>
                                                </div>
                                            </div>
                                            <div class="form-group">
                                                <label for="mapType" class="col-sm-3 control-label">使用地图类型：</label>
                                                <div class="col-sm-5">
                                                    <select id="mapType" name="mapType" class="form-control">
                                                        <option value="0"
                                                                <#if driver.mapType?? && driver.mapType=="0">selected="selected"</#if>>
                                                            百度地图
                                                        </option>
                                                        <option value="1"
                                                                <#if driver.mapType?? && driver.mapType=="1">selected="selected"</#if>>
                                                            谷歌地图
                                                        </option>
                                                        <option value="2"
                                                                <#if driver.mapType?? && driver.mapType=="2">selected="selected"</#if>>
                                                            高德地图
                                                        </option>
                                                        <option value="3"
                                                                <#if driver.mapType?? && driver.mapType=="3">selected="selected"</#if>>
                                                            腾讯地图
                                                        </option>
                                                    </select>
                                                </div>
                                            </div>
                                            <div class="form-group">
                                                <label for="mapType" class="col-sm-3 control-label">服务类型：</label>
                                                <div class="col-sm-5">
                                                    <select id="commercialType" name="commercialType"
                                                            class="form-control">
                                                        <option value="1"
                                                                <#if driver.commercialType?? && driver.commercialType=="1">selected="selected"</#if>>
                                                            网络预约出租车
                                                        </option>
                                                        <option value="2"
                                                                <#if driver.commercialType?? && driver.commercialType=="2">selected="selected"</#if>>
                                                            巡游出租车
                                                        </option>
                                                        <option value="3"
                                                                <#if driver.commercialType?? && driver.commercialType=="3">selected="selected"</#if>>
                                                            私人小客车合乘
                                                        </option>
                                                    </select>
                                                </div>
                                            </div>
                                            <div class="form-group">
                                                <label for="emergencyAddress" class="col-sm-3 control-label">紧急情况联系人通信地址：</label>
                                                <div class="col-sm-5">
                                                    <input class="form-control" id="emergencyAddress"
                                                           name="emergencyAddress" type="text"
                                                           value="${driver.emergencyAddress?if_exists}"
                                                           placeholder="请输入紧急情况联系人通信地址"/>
                                                </div>
                                            </div>
                                            <div class="form-group">
                                                <label for="seviceReview"
                                                       class="col-sm-3 control-label">驾驶员服务质量信誉考核结果：</label>
                                                <div class="col-sm-5">
                                                    <input class="form-control" id="seviceReview" name="seviceReview"
                                                           type="number" value="${driver.seviceReview?if_exists}"
                                                           placeholder="请输入驾驶员服务质量信誉考核结果"/>
                                                </div>
                                            </div>
                                        </div>

                                        <div class="col-sm-5" id="zhuanche_div">
                                            <h4>专车提成</h4>
                                            <hr/>
                                            <#list companys?sort_by("sort")?reverse as company>
                                                <div class="form-group">
                                                    <input type="hidden"
                                                           name="driverChoseLevelCars[${company_index}].companyId"
                                                           value="${company.id}">
                                                    <label for="type"><em>*</em>接${company.abbreviation?if_exists}
                                                        的订单提成方式<#if companyId==company.id>
                                                        <em>(当前登录用户所在公司)</em></#if><#if driver.companyId==company.id>
                                                        <em>(服务人员所在公司)</em></#if>：</label>
                                                    <select class="form-control"
                                                            name="driverChoseLevelCars[${company_index}].driverlevelId">
                                                        <option value="">不提成</option>
                                                        <#list company.driverLevels as driverlevel>
                                                            <option value="${driverlevel.id}"
                                                                    <#if driverlevel.driverCarChecked>selected="selected"</#if>>${driverlevel.name}</option>
                                                        </#list>
                                                        <#if driver.companyId!=company.id>
                                                            <option value="0"
                                                                    <#if company.useMineCar>selected="selected"</#if>>
                                                                始终使用服务人员所在公司提成
                                                            </option>
                                                        </#if>
                                                    </select>
                                                </div>
                                            </#list>
                                        </div>
                                    </div>
                                </div>
                            </div>
                        </@zhuan>
                        <@pao>
                            <div class="tab-pane in" id="errandTab">
                                <div class="panel margin-top">
                                    <div class="panel-body">
                                        <div class="col-sm-5" id="paotui_div">
                                            <h4>跑腿提成</h4>
                                            <hr/>
                                            <#list companys?sort_by("sort")?reverse as company>
                                                <div class="form-group">
                                                    <input type="hidden"
                                                           name="driverChoseLevelPaotuis[${company_index}].companyId"
                                                           value="${company.id}">
                                                    <label for="type"><em>*</em>接${company.abbreviation?if_exists}
                                                        的订单提成方式<#if companyId==company.id>
                                                        <em>(当前登录用户所在公司)</em></#if><#if driver.companyId==company.id>
                                                        <em>(服务人员所在公司)</em></#if>：</label>
                                                    <select class="form-control"
                                                            name="driverChoseLevelPaotuis[${company_index}].driverlevelId">
                                                        <option value="">不提成</option>
                                                        <#list company.driverLevels as driverlevel>
                                                            <option value="${driverlevel.id}"
                                                                    <#if driverlevel.driverPaotuiChecked>selected="selected"</#if>>${driverlevel.name}</option>
                                                        </#list>
                                                        <#if driver.companyId!=company.id>
                                                            <option value="0"
                                                                    <#if company.useMinePaotui>selected="selected"</#if>>
                                                                始终使用服务人员所在公司提成
                                                            </option>
                                                        </#if>
                                                    </select>
                                                </div>
                                            </#list>
                                        </div>
                                    </div>
                                </div>
                            </div>
                        </@pao>
                        <@freight>
                            <div class="tab-pane in" id="freightTab">
                                <div class="panel margin-top">
                                    <div class="panel-body">
                                        <div class="col-sm-7">
                                            <h4>货运服务人员信息</h4>
                                            <hr/>
                                            <div class="form-group">
                                                <label for="truckNumber"
                                                       class="col-sm-2 control-label">(货运)货车车牌：</label>
                                                <div class="col-sm-4">
                                                    <input class="form-control" id="truckNumber" name="truckNumber"
                                                           type="text"
                                                           <#if truck??>value="${truck.truckTypeName?if_exists}  <#if truck.cangointotown>--入城</#if> ${truck.carNumber?if_exists}"</#if>
                                                           placeholder="请输入车牌号"/>
                                                </div>
                                            </div>
                                        </div>
                                        <div class="col-sm-5" id="freight_div">
                                            <h4>货运提成</h4>
                                            <hr/>
                                            <#list companys?sort_by("sort")?reverse as company>
                                                <div class="form-group">
                                                    <input type="hidden"
                                                           name="driverChoseLevelFreights[${company_index}].companyId"
                                                           value="${company.id}">
                                                    <label for="type"><em>*</em>接${company.abbreviation?if_exists}
                                                        的订单提成方式<#if companyId==company.id>
                                                        <em>(当前登录用户所在公司)</em></#if><#if driver.companyId==company.id>
                                                        <em>(服务人员所在公司)</em></#if>：</label>
                                                    <select class="form-control"
                                                            name="driverChoseLevelFreights[${company_index}].driverlevelId">
                                                        <option value="">不提成</option>
                                                        <#list company.driverLevels as driverlevel>
                                                            <option value="${driverlevel.id}"
                                                                    <#if driverlevel.driverFreightChecked>selected="selected"</#if>>${driverlevel.name}</option>
                                                        </#list>
                                                        <#if driver.companyId!=company.id>
                                                            <option value="0"
                                                                    <#if company.useMineFreight>selected="selected"</#if>>
                                                                始终使用服务人员所在公司提成
                                                            </option>
                                                        </#if>
                                                    </select>
                                                </div>
                                            </#list>
                                        </div>
                                    </div>
                                </div>
                            </div>
                        </@freight>
                        <@zhuanxian>
                            <div class="tab-pane in" id="zhuanxianTab">
                                <div class="panel margin-top">
                                    <div class="panel-body">
                                        <div class="col-sm-7">
                                            <h4>快车服务人员信息</h4>
                                            <hr/>
                                            <div class="form-group">
                                                <label for="zhuanxianNumber"
                                                       class="col-sm-2 control-label">(快车)车辆车牌：</label>
                                                <div class="col-sm-4">
                                                    <input class="form-control" id="zhuanxianNumber"
                                                           name="zhuanxianNumber" type="text"
                                                           <#if zhuanxianCar??>value="${zhuanxianCar.carName?if_exists}  <#if zhuanxianCar.lines?? && (zhuanxianCar.lines?size>0)>(${zhuanxianCar.lines[0].name})</#if>  --${zhuanxianCar.carNumber?if_exists}"</#if>
                                                           placeholder="请输入车牌号"/>
                                                </div>
                                            </div>
                                        </div>
                                        <div class="col-sm-5" id="zhuanxian_div">
                                            <h4>快车提成</h4>
                                            <hr/>
                                            <div id="zhuanxian_line_div">
                                                <#if driverLevelData??>
                                                    <div class="form-group">
                                                        <#--
                                                                <#--<input type="hidden"
                                                                       name="driverChoseLevelZhuanxians[${line_index*3}].lineId"
                                                                       value="${line.id}">-->
                                                        <input type="hidden"
                                                               name="driverChoseLevelZhuanxians[0].lineType"
                                                               value="0">
                                                        <label for="type"><em>*</em>全路线：<#--【${line.name?if_exists}
                                                                】类型：-->【拼车】提成方式为：</label>
                                                        <select class="form-control"
                                                                name="driverChoseLevelZhuanxians[0].driverlevelId">
                                                            <option value="">不提成</option>
                                                            <#list companys?sort_by("sort")?reverse as company>
                                                                <#if company.id==companyId>
                                                                    <#list company.driverLevels as driverlevel>
                                                                        <option value="${driverlevel.id}"
                                                                                <#if driverLevelData.driverLevelId?? && driverLevelData.driverLevelId==driverlevel.id>selected="selected"</#if>>${driverlevel.name}</option>
                                                                    </#list>
                                                                </#if>
                                                            </#list>
                                                        </select>
                                                    </div>
                                                    <div class="form-group">
                                                        <#-- <input type="hidden"
                                                                name="driverChoseLevelZhuanxians[1].lineId"
                                                                value="${line.id}">-->
                                                        <input type="hidden"
                                                               name="driverChoseLevelZhuanxians[1].lineType"
                                                               value="1">
                                                        <label for="type"><em>*</em>全路线：<#--【${line.name?if_exists}
                                                                】类型：-->【包车】提成方式为：</label>
                                                        <select class="form-control"
                                                                name="driverChoseLevelZhuanxians[1].driverlevelId">
                                                            <option value="">不提成</option>
                                                            <#list companys?sort_by("sort")?reverse as company>
                                                                <#if company.id==companyId>
                                                                    <#list company.driverLevels as driverlevel>
                                                                        <option value="${driverlevel.id}"
                                                                                <#if driverLevelData.driverLevelBaocheId?? && driverLevelData.driverLevelBaocheId==driverlevel.id>selected="selected"</#if>>${driverlevel.name}</option>
                                                                    </#list>
                                                                </#if>
                                                            </#list>
                                                        </select>
                                                    </div>
                                                    <div class="form-group">
                                                        <input type="hidden"
                                                               name="driverChoseLevelZhuanxians[2].lineType"
                                                               value="2">
                                                        <label for="type"><em>*</em>全路线：<#--【${line.name?if_exists}
                                                                】类型：-->【寄货】提成方式为：</label>
                                                        <select class="form-control"
                                                                name="driverChoseLevelZhuanxians[2].driverlevelId">
                                                            <option value="">不提成</option>
                                                            <#list companys?sort_by("sort")?reverse as company>
                                                                <#if company.id==companyId>
                                                                    <#list company.driverLevels as driverlevel>
                                                                        <option value="${driverlevel.id}"
                                                                                <#if driverLevelData.driverLevelJihuoId?? && driverLevelData.driverLevelJihuoId==driverlevel.id>selected="selected"</#if>>${driverlevel.name}</option>
                                                                    </#list>
                                                                </#if>
                                                            </#list>
                                                        </select>
                                                    </div>
                                                <#--  </#list>
                                              <#else>
                                                  请先选择货运车辆或该车辆未选择路线 -->
                                                </#if>
                                            </div>
                                        </div>
                                    </div>
                                </div>
                            </div>
                        </@zhuanxian>
                        <@zhuan>
                            <div class="tab-pane in" id="trainTab">
                                <div class="col-xs-12" style=" padding: 0px 20px 15px 5px;">
                                    <button class="pull-right btn btn-primary addTrain" type="button"><i
                                                class="icon-plus"></i>&nbsp;添加培训课程
                                    </button>
                                </div>
                                <div class="panel margin-top">
                                    <div class="panel-body">
                                        <div class="tabta-content">
                                            <table class="table table-condensed table-striped" id="trainTable">
                                                <tbody>
                                                <tr>
                                                    <th>培训课程</th>
                                                    <th>培训课程日期</th>
                                                    <th>培训开始日期</th>
                                                    <th>培训结束日期</th>
                                                    <th>培训时长</th>
                                                </tr>
                                                </tbody>
                                            </table>
                                            <br>
                                            <div style="text-align:center" id="NoData"></div>
                                            </br>
                                            <ul class="pagination pull-left pagination-sm pageshow"
                                                style="display:none;">
                                                <li><a></a></li>
                                            </ul>
                                            <ul class="pagination pull-left pagination-sm pagedata"
                                                style="display:none;">
                                            </ul>
                                        </div>

                                    </div>
                                </div>
                            </div>

                        </@zhuan>
                    </div>

                    <div class="col-md-12" id="submit_div">
                        <div class="col-sm-offset-4 col-md-2">
                            <input id="submit_button" type="button" class="btn btn-primary btn-block" value="保存">
                        </div>
                        <div class="col-md-2">
                            <input type="button" class="btn btn-default btn-block"
                                   onclick="window.location.href = '${ctx}/driver/list';" value="返回">
                        </div>
                    </div>

                </form>

            </div>

        </div>
    </div>

    <!-- 添加培训课程 -->
    <div class="form-horizontal">
        <div class="modal fade" id="dialog_train" data-backdrop="static">
            <div class="modal-dialog">
                <div class="modal-content">
                    <div class="modal-header">
                        <button type="button" class="close" data-dismiss="modal" aria-hidden="false">&times;</button>
                        <h4 class="modal-title">添加培训课程</h4>
                    </div>
                    <div class="modal-body">
                        <form id="train_form" action="${ctx}/train/create" method="post">
                            <input type="hidden" id="driverId" name="driverId" value="${driver.id}">
                            <div class="form-group">
                                <label for="course" class="col-sm-3 control-label">课程名称:</label>
                                <div class="col-sm-9">
                                    <input id="course" name="course" placeholder="请输入课程名称" class="form-control"></input>
                                </div>
                            </div>
                            <div class="form-group">
                                <label for="trainTime" class="col-sm-3 control-label">培训课程日期：</label>
                                <div class="col-sm-9">
                                    <input class="form-control" id="trainTime" name="trainTime" type="text"
                                           placeholder="请输入培训课程日期" readonly/>
                                </div>
                            </div>
                            <div class="form-group">
                                <label for="beginTime" class="col-sm-3 control-label">培训开始日期：</label>
                                <div class="col-sm-9">
                                    <input class="form-control" id="beginTime" name="beginTime" type="text"
                                           placeholder="请输入培训开始日期" readonly/>
                                </div>
                            </div>
                            <div class="form-group">
                                <label for="endTime" class="col-sm-3 control-label">培训结束日期：</label>
                                <div class="col-sm-9">
                                    <input class="form-control" id="endTime" name="endTime" type="text"
                                           placeholder="请输入培训结束日期" readonly/>
                                </div>
                            </div>
                            <div class="form-group">
                                <label for="course" class="col-sm-3 control-label">培训时长:</label>
                                <div class="col-sm-9">
                                    <input id="trainDays" id="trainDays" name="trainDays" placeholder="请输入培训时长"
                                           type="number" class="form-control"></input>
                                </div>
                            </div>
                            <div class="form-group">
                                <div class="col-sm-5">
                                </div>
                                <div class="col-sm-3">
                                    <input type="button" class="btn btn-primary" id="save" value="确定">
                                    <button type="button" class="btn btn-default" id="close_modal">关闭</button>
                                </div>
                            </div>
                        </form>
                    </div>
                </div>
            </div>
        </div>
    </div>

    <!-- 添加违章与投诉信息 -->
    <div class="form-horizontal">
        <div class="modal fade" id="dialog_peccancyAndComplain" data-backdrop="static">
            <div class="modal-dialog">
                <div class="modal-content">
                    <div class="modal-header">
                        <button type="button" class="close" data-dismiss="modal" aria-hidden="false">&times;</button>
                        <h4 class="modal-title">添加违章与投诉信息</h4>
                    </div>
                    <div class="modal-body">
                        <form id="peccancyAndComplain_form" action="${ctx}/peccancyAndComplain/create" method="post">
                            <input type="hidden" id="driverId" name="driverId" value="${driver.id}">
                            <div class="form-group">
                                <label for="complainType" class="col-sm-3 control-label">类型：</label>
                                <div class="col-sm-9">
                                    <div class="checkbox">
                                        <label>
                                            <input type="radio" name="complainType" value="违章"
                                                   <#if driver.gender?? && driver.gender=='违章'>checked="checked"</#if> />违章
                                        </label>
                                        <label>
                                            <input type="radio" name="complainType" value="投诉"
                                                   <#if driver.gender?? && driver.gender=='投诉'>checked="checked"</#if> />投诉
                                        </label>
                                    </div>
                                </div>
                            </div>
                            <div class="form-group">
                                <label for="OrderId" class="col-sm-3 control-label">订单号：</label>
                                <div class="col-sm-9">
                                    <input id="orderId" name="orderId" placeholder="请输入违章/投诉订单号"
                                           class="form-control"></input>
                                </div>
                            </div>
                            <div class="form-group">
                                <label for="complaintTime" class="col-sm-3 control-label">违章/投诉时间：</label>
                                <div class="col-sm-9">
                                    <input class="form-control" id="complaintTime" name="complaintTime" type="text"
                                           placeholder="请输入违章/投诉时间" readonly/>
                                </div>
                            </div>
                            <div class="form-group">
                                <label for="complaintDetail" class="col-sm-3 control-label">违章/投诉内容：</label>
                                <div class="col-sm-9">
                                    <input id="complaintDetail" name="complaintDetail" placeholder="请输入违章/投诉订内容"
                                           class="form-control"></input>
                                </div>
                            </div>
                            <div class="form-group">
                                <label for="resultTime" class="col-sm-3 control-label">处理时间：</label>
                                <div class="col-sm-9">
                                    <input class="form-control" id="resultTime" name="resultTime" type="text"
                                           placeholder="请输入处理时间" readonly/>
                                </div>
                            </div>
                            <div class="form-group">
                                <label for="result" class="col-sm-3 control-label">处理结果：</label>
                                <div class="col-sm-9">
                                    <input id="result" name="result" placeholder="请输入处理结果" class="form-control"></input>
                                </div>
                            </div>

                            <div class="form-group">
                                <div class="col-sm-5">
                                </div>
                                <div class="col-sm-3">
                                    <input type="button" class="btn btn-primary" id="complaintSave" value="确定"/>
                                    <button type="button" class="btn btn-default" id="complaintClose">关闭</button>
                                </div>
                            </div>
                        </form>
                    </div>
                </div>
            </div>
        </div>
    </div>

    <div id="level_div" style="display:none;">
        <#list companys?sort_by("sort")?reverse as company>
            <#if company.id==companyId>
                <#list company.driverLevels as driverlevel>
                    <option value="${driverlevel.id}">${driverlevel.name}</option>
                </#list>
            </#if>
        </#list>
    </div>

    <div id="dialog_local_photo" class="modal fade bs-example-modal-sm" tabindex="-1" role="dialog"
         aria-labelledby="mySmallModalLabel" aria-hidden="true">
        <div class="modal-dialog modal-lg">
            <div class="modal-content">
                <div class="modal-header">
                    <button type="button" class="close close_modal" data-dismiss="modal" aria-hidden="true">&times;
                    </button>
                    <h4 class="modal-title">服务人员头像上传</h4>
                </div>
                <div class="modal-body">
                    <div class="row">
                        <div class="col-xs-8">
                            <div class="form-group">
                                <div class="caption" style="height:40px;">
                                    <p>
                                        <button href="javascript:;" class="btn btn-primary" id="photolocalsnap">本地上传
                                        </button>
                                        <input style="display:none;" type="file" name="pic1" id="photoFile"
                                               accept=".bmp,.gif,.jpeg,.jpg,.png">
                                        <button style="display:none;" href="javascript:;" class="btn btn-primary"
                                                id="photoSnap">拍照上传
                                        </button>
                                    </p>
                                </div>
                                <div style="width:400px;height:400px;overflow:hidden;display:none;">
                                    <video id="photoVideo" width="400" height="400" autoplay></video>
                                </div>
                                <canvas id="photoCanvas" width="400" height="400" style="display:none;"></canvas>
                                <div id="photoImg_div"
                                     style="width:400px;height:400px;display:table-cell;text-align:center;">

                                </div>
                            </div>
                        </div>
                        <div class="col-xs-4">
                            <div id="photoImg_container"
                                 style="width:200px;height:200px;overflow:hidden;margin-top:40px;">

                            </div>
                        </div>
                        <div class="col-xs-12">
                            <div class="form-group">
                                <div class="caption">
                                    <p>
                                        <button href="javascript:;" id="photo_ok" class="btn btn-primary">确认</button>
                                    </p>
                                </div>
                            </div>
                        </div>
                    </div>

                </div>
            </div>
        </div>
    </div>

    <div id="dialog_local_license" class="modal fade bs-example-modal-sm" tabindex="-1" role="dialog"
         aria-labelledby="mySmallModalLabel" aria-hidden="true">
        <div class="modal-dialog modal-lg">
            <div class="modal-content">
                <div class="modal-header">
                    <button type="button" class="close close_modal" data-dismiss="modal" aria-hidden="true">&times;
                    </button>
                    <h4 class="modal-title">服务人员驾驶证上传</h4>
                </div>
                <div class="modal-body">
                    <div class="row">
                        <div class="col-xs-6">
                            <div class="form-group">
                                <div class="caption" style="height:40px;">
                                    <p>
                                        <button href="javascript:;" class="btn btn-primary" id="licenselocalsnap">本地上传
                                        </button>
                                        <input style="display:none;" type="file" name="pic1" id="licenseFile"
                                               accept=".bmp,.gif,.jpeg,.jpg,.png">
                                        <button style="display:none;" href="javascript:;" class="btn btn-primary"
                                                id="licenseSnap">拍照上传
                                        </button>
                                    </p>
                                </div>
                                <div style="width:400px;height:400px;overflow:hidden;display:none;">
                                    <video id="licenseVideo" width="400" height="400" autoplay></video>
                                </div>
                                <canvas id="licenseCanvas" width="400" height="400" style="display:none;"></canvas>
                                <div id="licenseImg_div"
                                     style="width:400px;height:400px;display:table-cell;text-align:center;">

                                </div>
                            </div>
                        </div>
                        <div class="col-xs-6">
                            <div id="licenseImg_container"
                                 style="width:412px;height:150px;overflow:hidden;margin-top:40px;">

                            </div>
                        </div>
                        <div class="col-xs-12">
                            <div class="form-group">
                                <div class="caption">
                                    <p>
                                        <button href="javascript:;" id="license_ok" class="btn btn-primary">确认</button>
                                    </p>
                                </div>
                            </div>
                        </div>
                    </div>

                </div>
            </div>
        </div>
    </div>

    <div id="dialog_local_travel" class="modal fade bs-example-modal-sm" tabindex="-1" role="dialog"
         aria-labelledby="mySmallModalLabel" aria-hidden="true">
        <div class="modal-dialog modal-lg">
            <div class="modal-content">
                <div class="modal-header">
                    <button type="button" class="close close_modal" data-dismiss="modal" aria-hidden="true">&times;
                    </button>
                    <h4 class="modal-title">服务人员行驶证上传</h4>
                </div>
                <div class="modal-body">
                    <div class="row">
                        <div class="col-xs-6">
                            <div class="form-group">
                                <div class="caption" style="height:40px;">
                                    <p>
                                        <button href="javascript:;" class="btn btn-primary" id="travellocalsnap">本地上传
                                        </button>
                                        <input style="display:none;" type="file" name="pic1" id="travelFile"
                                               accept=".bmp,.gif,.jpeg,.jpg,.png">
                                        <button style="display:none;" href="javascript:;" class="btn btn-primary"
                                                id="travelSnap">拍照上传
                                        </button>
                                    </p>
                                </div>
                                <div style="width:400px;height:400px;overflow:hidden;display:none;">
                                    <video id="travelVideo" width="400" height="400" autoplay></video>
                                </div>
                                <canvas id="travelCanvas" width="400" height="400" style="display:none;"></canvas>
                                <div id="travelImg_div"
                                     style="width:400px;height:400px;display:table-cell;text-align:center;">

                                </div>
                            </div>
                        </div>
                        <div class="col-xs-6">
                            <div id="travelImg_container"
                                 style="width:412px;height:150px;overflow:hidden;margin-top:40px;">

                            </div>
                        </div>
                        <div class="col-xs-12">
                            <div class="form-group">
                                <div class="caption">
                                    <p>
                                        <button href="javascript:;" id="travel_ok" class="btn btn-primary">确认</button>
                                    </p>
                                </div>
                            </div>
                        </div>
                    </div>

                </div>
            </div>
        </div>
    </div>
    <!-- 上传资格证 -->
    <div id="dialog_local_qualification" class="modal fade bs-example-modal-sm" tabindex="-1" role="dialog"
         aria-labelledby="mySmallModalLabel" aria-hidden="true">
        <div class="modal-dialog modal-lg">
            <div class="modal-content">
                <div class="modal-header">
                    <button type="button" class="close close_modal" data-dismiss="modal" aria-hidden="true">&times;
                    </button>
                    <h4 class="modal-title">资格证上传</h4>
                </div>
                <div class="modal-body">
                    <div class="row">
                        <div class="col-xs-6">
                            <div class="form-group">
                                <div class="caption" style="height:40px;">
                                    <p>
                                        <button href="javascript:;" class="btn btn-primary" id="qualificationlocalsnap">
                                            本地上传
                                        </button>
                                        <input style="display:none;" type="file" name="pic1" id="qualificationFile"
                                               accept=".bmp,.gif,.jpeg,.jpg,.png">
                                        <button style="display:none;" href="javascript:;" class="btn btn-primary"
                                                id="qualificationSnap">拍照上传
                                        </button>
                                    </p>
                                </div>
                                <div style="width:400px;height:400px;overflow:hidden;display:none;">
                                    <video id="qualificationVideo" width="400" height="400" autoplay></video>
                                </div>
                                <canvas id="qualificationCanvas" width="400" height="400"
                                        style="display:none;"></canvas>
                                <div id="qualificationImg_div"
                                     style="width:400px;height:400px;display:table-cell;text-align:center;">
                                </div>
                            </div>
                        </div>
                        <div class="col-xs-6">
                            <div id="qualificationImg_container"
                                 style="width:412px;height:150px;overflow:hidden;margin-top:40px;"></div>
                        </div>
                        <div class="col-xs-12">
                            <div class="form-group">
                                <div class="caption">
                                    <p>
                                        <button href="javascript:;" id="qualification_ok" class="btn btn-primary">确认
                                        </button>
                                    </p>
                                </div>
                            </div>
                        </div>
                    </div>

                </div>
            </div>
        </div>
    </div>

    <div id="dialog_local_bigPhoto" class="modal fade bs-example-modal-sm" tabindex="-1" role="dialog"
         aria-labelledby="mySmallModalLabel" aria-hidden="true">
        <div class="modal-dialog modal-lg">
            <div class="modal-content">
                <div class="modal-header">
                    <button type="button" class="close close_modal" data-dismiss="modal" aria-hidden="true">&times;
                    </button>
                    <h4 class="modal-title">服务人员全身照上传</h4>
                </div>
                <div class="modal-body">
                    <div class="row">
                        <div class="col-xs-9">
                            <div class="form-group">
                                <div class="caption" style="height:40px;">
                                    <p>
                                        <button href="javascript:;" class="btn btn-primary" id="bigPhotolocalsnap">
                                            本地上传
                                        </button>
                                        <input style="display:none;" type="file" name="pic1" id="bigPhotoFile"
                                               accept=".bmp,.gif,.jpeg,.jpg,.png">
                                        <button style="display:none;" href="javascript:;" class="btn btn-primary"
                                                id="bigPhotoSnap">拍照上传
                                        </button>
                                    </p>
                                </div>
                                <div style="width:600px;height:600px;overflow:hidden;display:none;">
                                    <video id="bigPhotoVideo" width="600" height="600" autoplay></video>
                                </div>
                                <canvas id="bigPhotoCanvas" width="600" height="600" style="display:none;"></canvas>
                                <div id="bigPhotoImg_div"
                                     style="width:600px;height:600px;display:table-cell;text-align:center;">

                                </div>
                            </div>
                        </div>
                        <div class="col-xs-3">
                            <div id="bigPhotoImg_container"
                                 style="width:125px;height:200px;overflow:hidden;margin-top:40px;">

                            </div>
                        </div>
                        <div class="col-xs-12">
                            <div class="form-group">
                                <div class="caption">
                                    <p>
                                        <button href="javascript:;" id="bigPhoto_ok" class="btn btn-primary">确认</button>
                                    </p>
                                </div>
                            </div>
                        </div>
                    </div>

                </div>
            </div>
        </div>
    </div>

    <div id="dialog_local_idCardPhoto" class="modal fade bs-example-modal-sm" tabindex="-1" role="dialog"
         aria-labelledby="mySmallModalLabel" aria-hidden="true">
        <div class="modal-dialog modal-lg">
            <div class="modal-content">
                <div class="modal-header">
                    <button type="button" class="close close_modal" data-dismiss="modal" aria-hidden="true">&times;
                    </button>
                    <h4 class="modal-title">服务人员身份证上传</h4>
                </div>
                <div class="modal-body">
                    <div class="row">
                        <div class="col-xs-6">
                            <div class="form-group">
                                <div class="caption" style="height:40px;">
                                    <p>
                                        <button href="javascript:;" class="btn btn-primary" id="idCardPhotolocalsnap">
                                            本地上传
                                        </button>
                                        <input style="display:none;" type="file" name="pic1" id="idCardPhotoFile"
                                               accept=".bmp,.gif,.jpeg,.jpg,.png">
                                    </p>
                                </div>
                                <div id="idCardPhotoImg_div"
                                     style="width:400px;height:400px;display:table-cell;text-align:center;"></div>
                            </div>
                        </div>
                        <div class="col-xs-6">
                            <div id="idCardPhotoImg_container"
                                 style="width:412px;height:150px;overflow:hidden;margin-top:40px;"></div>
                        </div>
                        <div class="col-xs-12">
                            <div class="form-group">
                                <div class="caption">
                                    <p>
                                        <button href="javascript:;" id="idCardPhoto_ok" class="btn btn-primary">确认
                                        </button>
                                    </p>
                                </div>
                            </div>
                        </div>
                    </div>
                </div>
            </div>
        </div>
    </div>
    <!-- 上传身份证反面照片 -->
    <div id="dialog_local_backOfIdCardPhoto" class="modal fade bs-example-modal-sm" tabindex="-1" role="dialog"
         aria-labelledby="mySmallModalLabel" aria-hidden="true">
        <div class="modal-dialog modal-lg">
            <div class="modal-content">
                <div class="modal-header">
                    <button type="button" class="close close_modal" data-dismiss="modal" aria-hidden="true">&times;
                    </button>
                    <h4 class="modal-title">服务人员身份证反面上传</h4>
                </div>
                <div class="modal-body">
                    <div class="row">
                        <div class="col-xs-6">
                            <div class="form-group">
                                <div class="caption" style="height:40px;">
                                    <p>
                                        <button href="javascript:;" class="btn btn-primary"
                                                id="backOfIdCardPhotolocalsnap">本地上传
                                        </button>
                                        <input style="display:none;" type="file" name="pic1" id="backOfIdCardPhotoFile"
                                               accept=".bmp,.gif,.jpeg,.jpg,.png">
                                    </p>
                                </div>
                                <div id="backOfIdCardPhotoImg_div"
                                     style="width:400px;height:400px;display:table-cell;text-align:center;"></div>
                            </div>
                        </div>
                        <div class="col-xs-6">
                            <div id="backOfIdCardPhotoImg_container"
                                 style="width:412px;height:150px;overflow:hidden;margin-top:40px;"></div>
                        </div>
                        <div class="col-xs-12">
                            <div class="form-group">
                                <div class="caption">
                                    <p>
                                        <button href="javascript:;" id="backOfIdCardPhoto_ok" class="btn btn-primary">
                                            确认
                                        </button>
                                    </p>
                                </div>
                            </div>
                        </div>
                    </div>

                </div>
            </div>
        </div>
    </div>

    <div id="dialog_local_idCardHandPhoto" class="modal fade bs-example-modal-sm" tabindex="-1" role="dialog"
         aria-labelledby="mySmallModalLabel" aria-hidden="true">
        <div class="modal-dialog modal-lg">
            <div class="modal-content">
                <div class="modal-header">
                    <button type="button" class="close close_modal" data-dismiss="modal" aria-hidden="true">&times;
                    </button>
                    <h4 class="modal-title">服务人员手持身份证上传</h4>
                </div>
                <div class="modal-body">
                    <div class="row">
                        <div class="col-xs-6">
                            <div class="form-group">
                                <div class="caption" style="height:40px;">
                                    <p>
                                        <button href="javascript:;" class="btn btn-primary"
                                                id="idCardHandPhotolocalsnap">本地上传
                                        </button>
                                        <input style="display:none;" type="file" name="pic1" id="idCardHandPhotoFile"
                                               accept=".bmp,.gif,.jpeg,.jpg,.png">
                                    </p>
                                </div>
                                <div id="idCardHandPhotoImg_div"
                                     style="width:400px;height:400px;display:table-cell;text-align:center;">

                                </div>
                            </div>
                        </div>
                        <div class="col-xs-6">
                            <div id="idCardHandPhotoImg_container"
                                 style="width:412px;height:150px;overflow:hidden;margin-top:40px;">

                            </div>
                        </div>
                        <div class="col-xs-12">
                            <div class="form-group">
                                <div class="caption">
                                    <p>
                                        <button href="javascript:;" id="idCardHandPhoto_ok" class="btn btn-primary">确认
                                        </button>
                                    </p>
                                </div>
                            </div>
                        </div>
                    </div>

                </div>
            </div>
        </div>
    </div>

</@override>
<@override name="footer">
    <script src="${ctx}/assets/js/bootstrap-datetimepicker.min.js"></script>
    <script src="${ctx}/assets/js/bootstrap-datetimepicker.zh-CN.js"></script>
    <script src="${ctx}/assets/js/jquery.fancybox.js"></script>
    <script src="${ctx}/assets/js/ajaxfileupload.js"></script>
    <script src="${ctx}/assets/js/idcardvalid.js"></script>
    <script src="${ctx}/assets/js/district-all.js"></script>
    <script src="${ctx}/assets/js/driver.js"></script>
    <script src="${ctx}/assets/js/linkagesel.js"></script>
    <script src="${ctx}/assets/js/selectData.js"></script>
    <script src="${ctx}/assets/js/drivercamera.js"></script>
    <script src="${ctx}/assets/js/swfobject.js"></script>
    <script src="${ctx}/assets/js/jquery.Jcrop.js"></script>
    <script src="${ctx}/assets/js/jquery.autocomplete.min.js"></script>
    <script type="text/javascript">
        var vue = new Vue({
            el:"#app",
            data(){
                return {
                    tixian:true,
                    tuiguang:true
                }
            },
        })
        var driverId = ${driver.id};
        var isTixian = ${driver.tixian};
        var isTuiguang = ${driver.tuiguang};
        $(document).ready(function () {
            if(0 == isTixian) vue.tixian = false;
            if(1 == isTixian) vue.tixian = true;
            if(0 == isTuiguang) vue.tuiguang = false;
            if(1 == isTuiguang) vue.tuiguang = true;

            $('.fancybox').fancybox();

            $("li").click(function () {
                console.log($(this).attr("id"))
                if ($(this).attr("id") == "trainTabLi" || $(this).attr("id") == "peccancyAndComplainTabLi") {
                    $("#submit_div").hide();
                } else {
                    $("#submit_div").show();
                }
            })

            $(document).on("click", ".addTrain", function () {
                $('#dialog_train').modal();
            });
            $("#close_modal").click(function () {
                $('#dialog_train').modal("hide");
            });

            $(document).on("click", ".addPeccancyAndComplain", function () {
                $('#dialog_peccancyAndComplain').modal();
            });
            $("#complaintClose").click(function () {
                $('#dialog_peccancyAndComplain').modal("hide");
            });

            var driveredit = false;
            <@shiro.hasPermission name='driveredit'>
            driveredit = true;
            </@shiro.hasPermission>
            if (!driveredit) {
                $("#submit_button").parent().remove();
                $("#return_button").parent().addClass("col-sm-offset-4");
            }

            if ($("#birthday").length > 0) {
                $("#birthday").datetimepicker({
                    format: 'yyyy-mm-dd',
                    language: 'zh-CN',
                    minView: 'month',
                    pickDate: true,
                    pickTime: false,
                    inputMask: false,
                    autoclose: true,
                    endDate: new Date()
                });
            }
            if ($("#driverLicenseValid").length > 0) {
                $("#driverLicenseValid").datetimepicker({
                    format: 'yyyy-mm-dd',
                    language: 'zh-CN',
                    minView: 'month',
                    pickDate: true,
                    pickTime: false,
                    inputMask: false,
                    autoclose: true,
                    endDate: new Date()
                });
            }
            if ($("#driverLicenseInvalid").length > 0) {
                $("#driverLicenseInvalid").datetimepicker({
                    format: 'yyyy-mm-dd',
                    language: 'zh-CN',
                    minView: 'month',
                    pickDate: true,
                    pickTime: false,
                    inputMask: false,
                    autoclose: true,
                    startDate: new Date()
                });
            }
            if ($("#taxiLicenseRecive").length > 0) {
                $("#taxiLicenseRecive").datetimepicker({
                    format: 'yyyy-mm-dd',
                    language: 'zh-CN',
                    minView: 'month',
                    pickDate: true,
                    pickTime: false,
                    inputMask: false,
                    autoclose: true,
                    endDate: new Date()
                });
            }
            if ($("#taxiLicenseRegister").length > 0) {
                $("#taxiLicenseRegister").datetimepicker({
                    format: 'yyyy-mm-dd',
                    language: 'zh-CN',
                    minView: 'month',
                    pickDate: true,
                    pickTime: false,
                    inputMask: false,
                    autoclose: true,
                    endDate: new Date()
                });
            }
            if ($("#taxiLicenseValid").length > 0) {
                $("#taxiLicenseValid").datetimepicker({
                    format: 'yyyy-mm-dd',
                    language: 'zh-CN',
                    minView: 'month',
                    pickDate: true,
                    pickTime: false,
                    inputMask: false,
                    autoclose: true,
                    endDate: new Date()
                });
            }
            if ($("#taxiLicenseInvalid").length > 0) {
                $("#taxiLicenseInvalid").datetimepicker({
                    format: 'yyyy-mm-dd',
                    language: 'zh-CN',
                    minView: 'month',
                    pickDate: true,
                    pickTime: false,
                    inputMask: false,
                    autoclose: true,
                    startDate: new Date()
                });
            }
            if ($("#contractValid").length > 0) {
                $("#contractValid").datetimepicker({
                    format: 'yyyy-mm-dd',
                    language: 'zh-CN',
                    minView: 'month',
                    pickDate: true,
                    pickTime: false,
                    inputMask: false,
                    autoclose: true,
                    endDate: new Date()
                });
            }
            if ($("#contractInvalid").length > 0) {
                $("#contractInvalid").datetimepicker({
                    format: 'yyyy-mm-dd',
                    language: 'zh-CN',
                    minView: 'month',
                    pickDate: true,
                    pickTime: false,
                    inputMask: false,
                    autoclose: true,
                    startDate: new Date()
                });
            }
            if ($("#trainTime").length > 0) {
                $("#trainTime").datetimepicker({
                    format: 'yyyy-mm-dd',
                    language: 'zh-CN',
                    minView: 'month',
                    pickDate: true,
                    pickTime: false,
                    inputMask: false,
                    autoclose: true,
                    startDate: new Date()
                });
            }
            if ($("#beginTime").length > 0) {
                $("#beginTime").datetimepicker({
                    format: 'yyyy-mm-dd',
                    language: 'zh-CN',
                    minView: 'month',
                    pickDate: true,
                    pickTime: false,
                    inputMask: false,
                    autoclose: true,
                    startDate: new Date()
                });
            }
            if ($("#endTime").length > 0) {
                $("#endTime").datetimepicker({
                    format: 'yyyy-mm-dd',
                    language: 'zh-CN',
                    minView: 'month',
                    pickDate: true,
                    pickTime: false,
                    inputMask: false,
                    autoclose: true,
                    startDate: new Date()
                });
            }
            if ($("#complaintTime").length > 0) {
                $("#complaintTime").datetimepicker({
                    format: 'yyyy-mm-dd hh:ii:ss',
                    language: 'zh-CN',
                    minView: 'month',
                    pickDate: true,
                    pickTime: false,
                    inputMask: false,
                    autoclose: true,
                    startDate: new Date()
                });
            }
            if ($("#resultTime").length > 0) {
                $("#resultTime").datetimepicker({
                    format: 'yyyy-mm-dd hh:ii:ss',
                    language: 'zh-CN',
                    minView: 'month',
                    pickDate: true,
                    pickTime: false,
                    inputMask: false,
                    autoclose: true,
                    startDate: new Date()
                });
            }


            //平台的注册地行政区划代码下拉框实现
            var cityopts = {
                data: districtData,     // districtData为district-all.js中定义的变量
                selClass: 'form-control addressCode_class',
                head: '--请选择--',
                selStyle: 'margin-top: 3px;',
                fixWidth: 150,
                defVal: [${driver.addressCodeArr?if_exists}],
                select: '#addressCode_select'
            };
            var linkageSel = new LinkageSel(cityopts);
            linkageSel.onChange(function () {
                var code = this.getSelectedData('code');// 最末选定菜单的zip数据值
                $("#addressCode").val(code);
            });

            //驾驶员民族,下拉框实现
            var nationopts = {
                data: nationData,     // nationData为selectData.js中定义的变量
                selClass: 'form-control nation_class',
                head: '--请选择--',
                selStyle: 'margin-top: 3px;',
                fixWidth: 150,
                defVal: getNationDataIndex($("#nation").val()),
                select: '#nation_select'
            };

            var linkageSe3 = new LinkageSel(nationopts);
            linkageSe3.onChange(function () {
                var code = this.getSelectedData('code');// 最末选定菜单的zip数据值
                $("#nation").val(code);
            });

            //驾驶员学历,下拉框实现
            var educationopts = {
                data: educationData,     // educationData为selectData.js中定义的变量
                selClass: 'form-control education_class',
                head: '--请选择--',
                selStyle: 'margin-top: 3px;',
                fixWidth: 150,
                defVal: getEducationDataIndex($("#education").val()),
                select: '#education_select'
            };

            var linkageSe4 = new LinkageSel(educationopts);
            linkageSe4.onChange(function () {
                var code = this.getSelectedData('code');// 最末选定菜单的zip数据值
                $("#education").val(code);
            });

            //驾驶员准驾车型,下拉框实现
            var licenseTypeopts = {
                data: driverTypeData,     // driverTypeData为selectData.js中定义的变量
                selClass: 'form-control licenseType_class',
                head: '--请选择--',
                selStyle: 'margin-top: 3px;',
                fixWidth: 150,
                defVal: getDriverTypeDataIndex($("#licenseType").val()),
                select: '#licenseType_select'
            };

            var linkageSe5 = new LinkageSel(licenseTypeopts);
            linkageSe5.onChange(function () {
                var code = this.getSelectedData('code');// 最末选定菜单的zip数据值
                $("#licenseType").val(code);
            });

            //当监管平台开关打开时判定上传字段
            var isUpPlatformInfo = "${isUpPlatformInfo?string('true','flase')}";


            $("#submit_button").click(function () {
                // console.log("tixian:"+ vue.tixian)
                $("#tixian").val(vue.tixian?1:0);
                $("#tuiguang").val(vue.tuiguang?1:0);
                // console.log($("#tixianParam").val());
                var spCodesTemp = "";
                var driverJobType = "";
                $('input:checkbox[name=JobType]:checked').each(function (i) {
                    if (0 == i) {
                        spCodesTemp = $(this).val();
                    } else {
                        spCodesTemp += ("," + $(this).val());
                    }
                });
                $("input[name=driverJobType]:checked").each(function (i) {
                    if (0 == i) {
                        driverJobType = $(this).val();
                    } else {
                        driverJobType += ("," + $(this).val());
                    }
                });
                $("#detailedJobType").val(spCodesTemp);

                //公共验证
                var feifaPattern = new RegExp("[`~!@#$^&*()=|{}':;',\\[\\].<>/?~！@#￥……&*（）——|{}【】‘；：”“'。，、？]");
                var name = $("#name").val();
                if (name == "" || name == null) {
                    $.scojs_message("昵称不能为空", $.scojs_message.TYPE_ERROR);
                    return false;
                } else {
                    if (feifaPattern.test(name)) {
                        $.scojs_message("昵称不能含有非法字符", $.scojs_message.TYPE_ERROR);
                        return false;
                    }
                }
                var realname = $("#realname").val();
                if (realname == "" || realname == null) {
                    $.scojs_message("真实姓名不能为空", $.scojs_message.TYPE_ERROR);
                    return false;
                } else {
                    if (feifaPattern.test(realname)) {
                        $.scojs_message("真实姓名不能含有非法字符", $.scojs_message.TYPE_ERROR);
                        return false;
                    } else {
                        var reg = new RegExp("[\\u4E00-\\u9FFF]+", "g");//汉字
                        if (reg.test(realname)) {
                            //漢字
                            if (realname.length > 4) {
                                $.scojs_message("真实姓名长度最多为4个汉字", $.scojs_message.TYPE_ERROR);
                                return false;
                            }
                        } else {
                            if (realname.length > 8) {
                                $.scojs_message("真实姓名使用非汉字最多8个字符", $.scojs_message.TYPE_ERROR);
                                return false;
                            }
                        }
                    }
                }
                var idCard = $("#idCard").val();
                if (idCard == "" || idCard == null) {
                    $.scojs_message("身份证号不能为空", $.scojs_message.TYPE_ERROR);
                    return false;
                }
                if (idCard.length < 8) {
                    $.scojs_message("身份证至少填写8位", $.scojs_message.TYPE_ERROR);
                    return false;
                }
                var bankCard = $("#bankCard").val();
                if (bankCard == "" || bankCard == null) {
                    $.scojs_message("支付账号不能为空", $.scojs_message.TYPE_ERROR);
                    return false;
                }
                var phone = $("#phone").val();
                if (phone == "" || phone == null) {
                    $.scojs_message("手机号不能为空", $.scojs_message.TYPE_ERROR);
                    return false;
                }
                var isphone = /^[0-9]{1,15}$/;
                if (!isphone.test(phone)) {
                    $.scojs_message("手机号格式不正确", $.scojs_message.TYPE_ERROR);
                    return false;
                }
                var emergency = $("#emergency").val();
                if (emergency == "" || emergency == null) {
                    $.scojs_message("紧急联系人不能为空", $.scojs_message.TYPE_ERROR);
                    return false;
                }
                var licenseTime = $("#licenseTime").val();
                if (licenseTime == "" || licenseTime == null) {
                    $.scojs_message("领证时间不能为空", $.scojs_message.TYPE_ERROR);
                    return false;
                }
                var zhuanchestart = $("input[name='driverJobType']:checked")
                if (zhuanchestart.length == 0) {
                    $.scojs_message("至少选择一种服务类型", $.scojs_message.TYPE_ERROR);
                    return false;
                }
                //js中断标识
                var brokenFlag = true;

                //是否选择跑腿业务
                zhuanchestart.each(function (index, element) {
                    var elementVal = $(element).val();
                    if ("paotui" == elementVal) {
                        var paotuiCld = $("input[name='JobType']:checked")
                        if (paotuiCld.length == 0) {
                            $.scojs_message("至少选择一种跑腿子类型", $.scojs_message.TYPE_ERROR);
                            brokenFlag = false;
                            retrun;
                        }
                    }
                });
                //是否选择专车业务
                zhuanchestart.each(function (index, element) {
                    var elementVal = $(element).val();
                    if ("zhuanche" == elementVal) {
                        if ("true" == isUpPlatformInfo) {
                            //上传验证
                            //服务人员头像是否为空
                            var show_photo = $("#show_photo")[0].src;
                            var flag = show_photo.indexOf("noImg.png");
                            if (CheckImgExists(show_photo)) {
                                if (flag != -1) {
                                    $.scojs_message("上传监管平台开关已开启，请上传服务人员头像", $.scojs_message.TYPE_ERROR);
                                    brokenFlag = false;
                                    retrun;
                                }
                            } else {
                                $.scojs_message("上传监管平台开关已开启，请上传服务人员头像", $.scojs_message.TYPE_ERROR);
                                brokenFlag = false;
                                retrun;
                            }
                            //服务人员驾驶证图片是否为空
                            var show_license = $("#show_license")[0].src;
                            var flag = show_photo.indexOf("noImg.png");
                            if (CheckImgExists(show_license)) {
                                if (flag != -1) {
                                    $.scojs_message("上传监管平台开关已开启，请上传服务人员驾驶证图片", $.scojs_message.TYPE_ERROR);
                                    brokenFlag = false;
                                    retrun;
                                }
                            } else {
                                $.scojs_message("上传监管平台开关已开启，请上传服务人员驾驶证图片", $.scojs_message.TYPE_ERROR);
                                brokenFlag = false;
                                retrun;
                            }

                            var driveTimes = $("#driveTimes").val();
                            if (driveTimes == "" || driveTimes == null) {
                                $.scojs_message("上传监管平台开关已开启，服务次数不能为空", $.scojs_message.TYPE_ERROR);
                                brokenFlag = false;
                                retrun;
                            }
                            var starLevel = $("#starLevel").val();
                            if (starLevel == "" || starLevel == null) {
                                $.scojs_message("上传监管平台开关已开启，服务人员评分不能为空", $.scojs_message.TYPE_ERROR);
                                brokenFlag = false;
                                retrun;
                            }
                            var licenseType = $("#licenseType").val();
                            if (licenseType == "" || licenseType == null) {
                                $.scojs_message("上传监管平台开关已开启，驾照类型不能为空", $.scojs_message.TYPE_ERROR);
                                brokenFlag = false;
                                retrun;
                            }
                            var introducer = $("#introducer").val();
                            if (introducer == "" || introducer == null) {
                                $.scojs_message("上传监管平台开关已开启，介绍人不能为空", $.scojs_message.TYPE_ERROR);
                                brokenFlag = false;
                                retrun;
                            }
                            var height = $("#height").val();
                            if (height == "" || height == null) {
                                $.scojs_message("上传监管平台开关已开启，服务人员身高不能为空", $.scojs_message.TYPE_ERROR);
                                brokenFlag = false;
                                retrun;
                            }
                            var driverCensus = $("#driverCensus").val();
                            if (driverCensus == "" || driverCensus == null) {
                                $.scojs_message("上传监管平台开关已开启，户口登记机关不能为空", $.scojs_message.TYPE_ERROR);
                                return false;
                            } else {
                                if (driverCensus.length > 35) {
                                    $.scojs_message("上传监管平台开关已开启，户口登记机关，长度超过35个字符", $.scojs_message.TYPE_ERROR);
                                    return false;
                                }
                            }
                            var origin = $("#origin").val();
                            if (origin == "" || origin == null) {
                                $.scojs_message("上传监管平台开关已开启，服务人员籍贯不能为空", $.scojs_message.TYPE_ERROR);
                                brokenFlag = false;
                                retrun;
                            }
                            var address = $("#address").val();
                            if (address == "" || address == null) {
                                $.scojs_message("上传监管平台开关已开启，服务人员家庭住址不能为空", $.scojs_message.TYPE_ERROR);
                                brokenFlag = false;
                                retrun;
                            }
                            var pressingName = $("#pressingName").val();
                            if (pressingName == "" || pressingName == null) {
                                $.scojs_message("上传监管平台开关已开启，紧急联系人不能为空", $.scojs_message.TYPE_ERROR);
                                brokenFlag = false;
                                retrun;
                            }
                            var pressingPhone = $("#pressingPhone").val();
                            if (pressingPhone == "" || pressingPhone == null) {
                                $.scojs_message("上传监管平台开关已开启，紧急电话不能为空", $.scojs_message.TYPE_ERROR);
                                brokenFlag = false;
                                retrun;
                            }
                            var pressingPhone = $("#pressingPhone").val();
                            if (pressingPhone == "" || pressingPhone == null) {
                                $.scojs_message("上传监管平台开关已开启，紧急电话不能为空", $.scojs_message.TYPE_ERROR);
                                brokenFlag = false;
                                retrun;
                            }
                            var addressCode = $("#addressCode").val();
                            if (addressCode == "" || addressCode == null) {
                                $.scojs_message("上传监管平台开关已开启，平台的注册地行政区划代码不能为空", $.scojs_message.TYPE_ERROR);
                                brokenFlag = false;
                                retrun;
                            } else {
                                if (addressCode.substring(2, 4) == "00" && addressCode != "710000" && addressCode != "810000" && addressCode != "820000") {
                                    $.scojs_message("上传监管平台开关已开启，省请选择市级（除台湾省），直辖市请选择下辖区", $.scojs_message.TYPE_ERROR);
                                    brokenFlag = false;
                                    retrun;
                                }
                            }
                            var carNumber = $("#carNumber").val();
                            if (carNumber == "" || carNumber == null) {
                                $.scojs_message("上传监管平台开关已开启，车辆车牌不能为空", $.scojs_message.TYPE_ERROR);
                                brokenFlag = false;
                                retrun;
                            }
                            var driverLicenseNo = $("#driverLicenseNo").val();
                            if (driverLicenseNo == "" || driverLicenseNo == null) {
                                $.scojs_message("上传监管平台开关已开启，机动车驾驶证号不能为空", $.scojs_message.TYPE_ERROR);
                                brokenFlag = false;
                                retrun;
                            }
                            var driverLicenseId = $("#driverLicenseId").val();
                            if (driverLicenseId == "" || driverLicenseId == null) {
                                $.scojs_message("上传监管平台开关已开启，机动车驾档编号不能为空", $.scojs_message.TYPE_ERROR);
                                brokenFlag = false;
                                retrun;
                            }
                            var nationality = $("#nationality").val();
                            if (nationality == "" || nationality == null) {
                                $.scojs_message("上传监管平台开关已开启，国籍不能为空", $.scojs_message.TYPE_ERROR);
                                brokenFlag = false;
                                retrun;
                            }
                            var nation = $("#nation").val();
                            if (nation == "" || nation == null) {
                                $.scojs_message("上传监管平台开关已开启，驾驶员民族不能为空", $.scojs_message.TYPE_ERROR);
                                brokenFlag = false;
                                retrun;
                            }
                            var birthday = $("#birthday").val();
                            if (birthday == "" || birthday == null) {
                                $.scojs_message("上传监管平台开关已开启，出生日期不能为空", $.scojs_message.TYPE_ERROR);
                                brokenFlag = false;
                                retrun;
                            }
                            var marital = $("#marital").val();
                            if (marital == "" || marital == null) {
                                $.scojs_message("上传监管平台开关已开启，驾驶员婚姻状况不能为空", $.scojs_message.TYPE_ERROR);
                                brokenFlag = false;
                                retrun;
                            }
                            var education = $("#education").val();
                            if (education == "" || education == null) {
                                $.scojs_message("上传监管平台开关已开启，驾驶员学历不能为空", $.scojs_message.TYPE_ERROR);
                                brokenFlag = false;
                                retrun;
                            }
                            var foreignLanguageAbility = $("#foreignLanguageAbility").val();
                            if (foreignLanguageAbility == "" || foreignLanguageAbility == null) {
                                $.scojs_message("上传监管平台开关已开启，驾驶员外语能力不能为空", $.scojs_message.TYPE_ERROR);
                                brokenFlag = false;
                                retrun;
                            }
                            var concatAddress = $("#concatAddress").val();
                            if (concatAddress == "" || concatAddress == null) {
                                $.scojs_message("上传监管平台开关已开启，驾驶员驾驶员通信地址不能为空", $.scojs_message.TYPE_ERROR);
                                brokenFlag = false;
                                retrun;
                            }
                            var trafficViolation = $("#trafficViolation").val();
                            if (trafficViolation == "" || trafficViolation == null) {
                                $.scojs_message("上传监管平台开关已开启，交通违章次数不能为空", $.scojs_message.TYPE_ERROR);
                                brokenFlag = false;
                                retrun;
                            }
                            var driverLicenseValid = $("#driverLicenseValid").val();
                            if (driverLicenseValid == "" || driverLicenseValid == null) {
                                $.scojs_message("上传监管平台开关已开启，驾驶证有效期起始时间不能为空", $.scojs_message.TYPE_ERROR);
                                brokenFlag = false;
                                retrun;
                            }
                            var driverLicenseInvalid = $("#driverLicenseInvalid").val();
                            if (driverLicenseInvalid == "" || driverLicenseInvalid == null) {
                                $.scojs_message("上传监管平台开关已开启，驾驶证有效期限结束时间不能为空", $.scojs_message.TYPE_ERROR);
                                brokenFlag = false;
                                retrun;
                            }
                            var taxiLicenseNo = $("#taxiLicenseNo").val();
                            if (taxiLicenseNo == "" || taxiLicenseNo == null) {
                                $.scojs_message("上传监管平台开关已开启，网络预约出租车驾驶员证编号不能为空", $.scojs_message.TYPE_ERROR);
                                brokenFlag = false;
                                retrun;
                            }
                            var taxiLicenseOrg = $("#taxiLicenseOrg").val();
                            if (taxiLicenseOrg == "" || taxiLicenseOrg == null) {
                                $.scojs_message("上传监管平台开关已开启，资格证发证机构不能为空", $.scojs_message.TYPE_ERROR);
                                brokenFlag = false;
                                retrun;
                            }
                            var taxiLicenseRegister = $("#taxiLicenseRegister").val();
                            if (taxiLicenseRegister == "" || taxiLicenseRegister == null) {
                                $.scojs_message("上传监管平台开关已开启，资格证发证日期不能为空", $.scojs_message.TYPE_ERROR);
                                brokenFlag = false;
                                retrun;
                            }
                            var taxiLicenseRecive = $("#taxiLicenseRecive").val();
                            if (taxiLicenseRecive == "" || taxiLicenseRecive == null) {
                                $.scojs_message("上传监管平台开关已开启，初次领取资格证日期不能为空", $.scojs_message.TYPE_ERROR);
                                brokenFlag = false;
                                retrun;
                            }
                            var taxiLicenseValid = $("#taxiLicenseValid").val();
                            if (taxiLicenseValid == "" || taxiLicenseValid == null) {
                                $.scojs_message("上传监管平台开关已开启，资格证有效起始日期不能为空", $.scojs_message.TYPE_ERROR);
                                brokenFlag = false;
                                retrun;
                            }
                            var taxiLicenseInvalid = $("#taxiLicenseInvalid").val();
                            if (taxiLicenseInvalid == "" || taxiLicenseInvalid == null) {
                                $.scojs_message("上传监管平台开关已开启，资格证有效截止日期不能为空", $.scojs_message.TYPE_ERROR);
                                brokenFlag = false;
                                retrun;
                            }
                            var contractCompany = $("#contractCompany").val();
                            if (contractCompany == "" || contractCompany == null) {
                                $.scojs_message("上传监管平台开关已开启，合同（或协议）签署公司不能为空", $.scojs_message.TYPE_ERROR);
                                brokenFlag = false;
                                retrun;
                            }
                            var contractValid = $("#contractValid").val();
                            if (contractValid == "" || contractValid == null) {
                                $.scojs_message("上传监管平台开关已开启，合同有效期起始时间不能为空", $.scojs_message.TYPE_ERROR);
                                brokenFlag = false;
                                retrun;
                            }
                            var contractInvalid = $("#contractInvalid").val();
                            if (contractInvalid == "" || contractInvalid == null) {
                                $.scojs_message("上传监管平台开关已开启，合同有效期结束时间不能为空", $.scojs_message.TYPE_ERROR);
                                brokenFlag = false;
                                retrun;
                            }
                            var cruise = $("#cruise").val();
                            if (cruise == "" || cruise == null) {
                                $.scojs_message("上传监管平台开关已开启，请选择是否巡游出租汽车驾驶员", $.scojs_message.TYPE_ERROR);
                                brokenFlag = false;
                                retrun;
                            }
                            var inBlacklist = $("#inBlacklist").val();
                            if (inBlacklist == "" || inBlacklist == null) {
                                $.scojs_message("上传监管平台开关已开启，请选择是否在黑名单内", $.scojs_message.TYPE_ERROR);
                                brokenFlag = false;
                                retrun;
                            }
                            var phoneOperator = $("#phoneOperator").val();
                            if (phoneOperator == "" || phoneOperator == null) {
                                $.scojs_message("上传监管平台开关已开启，请选择服务人员运营商", $.scojs_message.TYPE_ERROR);
                                brokenFlag = false;
                                retrun;
                            }
                            var mapType = $("#mapType").val();
                            if (mapType == "" || mapType == null) {
                                $.scojs_message("上传监管平台开关已开启，请选择使用地图类型", $.scojs_message.TYPE_ERROR);
                                brokenFlag = false;
                                retrun;
                            }
                            var commercialType = $("#commercialType").val();
                            if (commercialType == "" || commercialType == null) {
                                $.scojs_message("上传监管平台开关已开启，请选择服务类型", $.scojs_message.TYPE_ERROR);
                                brokenFlag = false;
                                retrun;
                            }
                            var emergencyAddress = $("#emergencyAddress").val();
                            if (emergencyAddress == "" || emergencyAddress == null) {
                                $.scojs_message("上传监管平台开关已开启，紧急情况联系人通信地址不能为空", $.scojs_message.TYPE_ERROR);
                                brokenFlag = false;
                                retrun;
                            }
                            var seviceReview = $("#seviceReview").val();
                            if (seviceReview == "" || seviceReview == null) {
                                $.scojs_message("上传监管平台开关已开启，驾驶员服务质量信誉考核结果不能为空", $.scojs_message.TYPE_ERROR);
                                brokenFlag = false;
                                retrun;
                            }
                        }
                    }
                });

                if (brokenFlag) {
                    var addressCodeIdsArr = [];
                    $(".addressCode_class").each(function (index, element) {
                        if ($(element).val() != "") {
                            addressCodeIdsArr.push($(element).val());
                        }
                        $("#addressCodeArr").val(addressCodeIdsArr.join(","));
                    });


                    //验证通过
                    $.post(ctx + "/driver/update", $("#submit_form").serialize(),
                        function (data) {
                            if (data.success) {
                                $.scojs_message("修改成功", $.scojs_message.TYPE_OK);
                                setTimeout(function () {
                                    window.location.href = ctx + "/driver/list";
                                }, 800);
                            } else {
                                $.scojs_message(data.message, $.scojs_message.TYPE_ERROR);
                            }
                        }, 'json');
                }
            });

            cityopts = null;
            districtData = null;
            nationopts = null;
            nationData = null;
            educationopts = null;
            educationData = null;
            licenseTypeopts = null;
            driverTypeData = null;

        });


        function CheckImgExists(imgurl) {
            var ImgObj = new Image(); //判断图片是否存在
            ImgObj.src = imgurl;
            //没有图片，则返回-1
            if (ImgObj.fileSize > 0 || (ImgObj.width > 0 && ImgObj.height > 0)) {
                return true;
            } else {
                return false;
            }
        }


    </script>
    <script src="${ctx}/assets/js/train/list.js"></script>
    <script src="${ctx}/assets/js/peccancyAndComplain/list.js"></script>
</@override>
<@extends name="../layout.ftl"/>
